handling symlinked paths in lookup tables

Aleix Pol aleixpol at kde.org
Thu Oct 22 17:05:03 UTC 2015


On Thu, Oct 22, 2015 at 3:16 PM, Milian Wolff <mail at milianw.de> wrote:
> 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?

So the actual problem is that kdev-clang doesn't support symlinks?

Aleix


More information about the KDevelop-devel mailing list