handling symlinked paths in lookup tables
Milian Wolff
mail at milianw.de
Thu Oct 22 13:16:15 UTC 2015
Hey all,
has anyone a good idea on how to handle symlinked paths in lookup tables, such
as the one we use to find defines/include paths in the cmake manager?
I've in the past added a few calls to QFileInfo::canonicalFilePath here and
there, but my last patches (all reverted again) show how fragile this is...
At work, I have a stupidly complex setup in one project:
/home/milan/
/home/milian/projects -> symlinks to /ssd/projects
/home/milian/projects/foo/
/home/milian/projects/foo/bar -> symlinks to /home/milian/projects/bar-asdf
now when I open foo as a project in KDevelop, include paths within the
symlinked bar will fail. For the same file.h the above can result in a huge
number of paths that all point to the same file:
/ssd/projects/bar-asdf/file.h
/ssd/projects/foo/bar/file.h # bar symlinked
/home/milian/projects/bar-asdf/file.h # projects symlinked
/home/milian/projects/foo/bar/file.h # projects and bar symlinked
Has anyone an idea how to efficiently handle this case? Do we have to use a
canonical path for the lookup table, then do a lookup on the project item path
and if that fails, use the canonicalized item path as a fallback?
Bye
--
Milian Wolff
mail at milianw.de
http://milianw.de
More information about the KDevelop-devel
mailing list