Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bear needs to canonicalise file paths #61

Closed
nickhutchinson opened this issue May 2, 2014 · 1 comment
Closed

Bear needs to canonicalise file paths #61

nickhutchinson opened this issue May 2, 2014 · 1 comment
Labels
Milestone

Comments

@nickhutchinson
Copy link

Bear currently doesn't resolve relative path components for the file key in each compilation entry. So if you invoke Bear with something like the following:
bear -- sh -c "gcc /home/nick/foo/bar/../../fee.c", you get a compilation database entry like:

{
  "directory": "/home/nick",
  "command": "gcc /home/nick/foo/bar/../../fee.c",
  "file": "/home/nick/foo/bar/../../fee.c"
}

This is a problem, because when you feed a compilation database to libclang's CXCompilationDatabase, it doesn't canonicalise these paths for you. (At least not with LLVM 3.4.) If you ask it for the flags for /home/nick/fee.c, it won't return any results.

@rizsotto
Copy link
Owner

rizsotto commented May 2, 2014

Thanks for this report. Gonna fix when I'm back from vacation.

rizsotto added a commit that referenced this issue May 4, 2014
@rizsotto rizsotto added this to the 1.4.1 milestone May 4, 2014
@rizsotto rizsotto added the bug label May 4, 2014
@rizsotto rizsotto modified the milestone: 1.4.1 May 9, 2014
@rizsotto rizsotto closed this as completed May 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants