Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Why doesn't posix_platform NormalizePath resolve symlinks? #833

Open
rpav opened this issue Nov 20, 2018 · 0 comments
Open

Why doesn't posix_platform NormalizePath resolve symlinks? #833

rpav opened this issue Nov 20, 2018 · 0 comments

Comments

@rpav
Copy link

rpav commented Nov 20, 2018

Is there a reason NormalizePath in platform_posix.cc uses a function which does not expand symlinks? (i.e., RelPathNotExpandSymlink) As per my comment in cquery-project/emacs-cquery#47, this appears to produce incorrect results.

For example, on my system (Arch Linux):

/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../..
  is not:
/
  but rather:
/usr

as per:

$ realpath /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../..
/usr

Due to this, cquery spews tens of thousands of lines of "Could not normalize path..." rather than working. Note, cquery --check "works," in that it finds a proper command line from compile_commands.json, but it doesn't seem to actually resolve anything beyond this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant