Overriding an existing project should wipe .kdev4 directory
Closed, ResolvedPublic

Description

When user imports a project from a directory, which already contains a *.kdev4 file, KDevelop asks him whether he wants to open an existing project, or to override it and create a new one. In latter case, existing *.kdev4 file gets overwritten.

But .kdev4 directory stays. This may confuse project manager, if it makes decisions based on projectConfiguration() items (which is the case for Haskell, for instance). So, to be safe lets also remove .kdev dir when overriding the project.

arrowd created this task.Jun 4 2017, 5:34 PM
kfunk moved this task from Backlog to Work in progress on the KDevelop board.Jul 5 2017, 1:54 PM
rjvbb added a subscriber: rjvbb.Sep 27 2018, 10:56 PM

Exactly how can the project manager be confused when you don't remove the .kdev4 directory, knowing that it will be recreated almost immediately after deleting it? (In any case I don't see how it could *not* be recreated given that it will hold the new settings file).

The problem with deleting is that the user may have multiple projects configured in a source tree, something for which I have been working on a more consistent use of the projectname: https://phabricator.kde.org/D9344 . That work was started in the 5.2 branch and it is only now that I understand why I have been losing settings files since I started using the 5.3 branch ...

If the projectmanager for a given language gets confused by multiple files in the .kdev4 directory this should be fixed, not worked around by deleting that directory.

(In any case I don't see how it could *not* be recreated given that it will hold the new settings file).

Project manager was picking old settings file instead of creating a new one.