-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Support emitting realpaths in compile_commands.json #612
Comments
Thanks @andrewbraxton for this report. Will implement this in the 4.0 version. My plan is to control this aspect from the config file. |
@andrewbraxton question for you: is realpath needs to be absolute path? Or that could be relative too? I am planning to make this as a configuration parameter. And I am wondering if this is represented in a single parameter or with multiple parameters. A single parameter could be: "keep the original", "make it relative", "make it absolute", "make it realpath". A multiple parameter could be something like: "relative", "absolute" and the other parameter can have values like: "realpath", "no change". |
I don't have a preference for single vs multiple parameters, but in either case I'd probably always configure it to use absolute paths anyway. I'm not sure what the use case for using relative paths would be. |
@andrewbraxton @rizsotto Would be really cool to have it configurable both for absolute and relative. My usecase is that I build the code under the docker container and due to several reasons I cannot match the filesystem layout in docker container and in the host system. So I would really prefer having the relative realpath in the |
Clangd suffers from a collection of issues when it comes to symlinks in compile_commands.json, for example:
There doesn't seem to be much inertia towards fixing this in clangd. My suggestion for
bear
is to have a way to resolve all symlinks and emit only realpaths in compile_commands.json, particularly for the "file" key which is important for go-to-definition functionality. This could come in the form of a flag called something like--resolve-symlinks
, or maybe a field in the "output" section of the config file.The text was updated successfully, but these errors were encountered: