D7952: [WIP] make KDevelop::Path work with canonical representations
René J.V. Bertin
noreply at phabricator.kde.org
Sat Sep 23 13:06:09 UTC 2017
rjvbb created this revision.
rjvbb added a reviewer: KDevelop.
rjvbb added a project: KDevelop.
REVISION SUMMARY
This is a spin-off of https://phabricator.kde.org/D7930, intended to investigate the idea of working with canonical path representations throughout KDevelop.
The patch achieves this by converting paths to their canonical representation on input, currently without opt-in/out and probably not in the most efficient way.
It works on paths only; symlinks to files are left untouched.
This patch indeed makes the one from https://phabricator.kde.org/D7930 superfluous for me. For me it also triggers an apparently known issue that where the parser gets confused including the proper "debug.h" headers, leading to errors like `Use of undeclared identifier 'CMAKE'`.
TEST PLAN
the test_path unittest succeeds but would probably need to check the result of canonicalisation.
At least 2 places that could be optimised:
- the concatenation of the canonicalised file path and the file name in `toCanonicalPath()`
- the canonicalisation of the result of a concatenation in `Path::addPath()`.
In theory there should be no need to make this feature optional; the patch emulates what happens at the OS level on Mac. One could consider providing a more or less visible option for advanced users to deactivate the feature if it breaks anything for them (or for optimal performance in contexts where canonicalisation is not required).
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D7952
AFFECTED FILES
kdevplatform/util/path.cpp
To: rjvbb, #kdevelop
Cc: kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170923/c0aad905/attachment.html>
More information about the KDevelop-devel
mailing list