D7930: Kdevelop CMake plugin : use canonical paths to build.dir

René J.V. Bertin noreply at phabricator.kde.org
Sat Oct 7 13:29:29 UTC 2017


rjvbb added a comment.


  I've kept the request to add a unittest to this in the back of my mind. I cannot think of any feasible way to do this.
  
  - The canonicalisation itself uses an external function
  - if it makes the cmake project import fail this will be caught by existing unittests
  
  In addition:
  
  - it is not the import of projects affected by the use of a build.dir with symlink(s) in its path that goes awry: the project is imported correctly (and faithfully enough to reproduce a symptom that exists outside of KDevelop)
  - the issue manifests itself during parsing but is not the result of an issue in how KDevelop uses libclang to parse code
  
  In short, KDevelop triggers something that could be considered an issue in CMake and/or in Qt utilities like whatever generates the moc source files. The only thing KDevelop does wrong here is the fact that it doesn't protect the user against this situation.
  
  The patch would undoubtedly be simpler if canonicalisation were done at the input level (i.e. when the user specifies a build directory) rather than on the fly each time the build.dir is obtained from the settings store. Doing this will also inform the user directly (and immediately, when the dir is obtained using a file dialog) what directory is used. I didn't dare to propose that change initially because of potential side-effects I cannot foresee but maybe such side-effects simply don't exist.
  
  FWIW, some form of canonicalisation already happens when picking a build.dir. Otherwise one should get an error when selecting a build.dir path with symlinks in it for a project that was already configured for the canonical version of that path.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D7930

To: rjvbb, #kdevelop, apol
Cc: flherne, mwolff, apol, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171007/8876b560/attachment.html>


More information about the KDevelop-devel mailing list