Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

bugfix: pick path under project root when possible #28

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

shrouxm
Copy link
Contributor

@shrouxm shrouxm commented Nov 16, 2020

partially fixes #14 (addresses issue in repo reported for, but in theory does not always address issue):

so bazel (and potentially other build systems) will sometimes use what are called "virtual includes", where header files are copied to new folders, and those folders placed on the include path. then when lsif-clang indexes, it sees headers being included from a weird path under the bazel execution root instead of the actual include path, so data from those includes is dropped (and even if it were included, would be useless).

this PR updates the mergeSymbol method to prefer paths that do exist under the project root. in the case of the project in the linked issue, this is a complete fix as the header files are individually indexed. if the header files themselves were not entries in the compilation database, they would only ever be seen by lsif-clang as virtual includes and be therefore un-indexable. it's not clear how to resolve this issue in that case.

@shrouxm shrouxm added this to the 3.22 milestone Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

definitions aren't output for templates
1 participant