-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Improve handling of relative paths in directory
field of compile_commands.json
(spec is unclear)
#12290
Comments
So, I think I've found the issue, in 1.19.9 paths are resolved relative to the workspace folder, so this entry in compile_commands.json works: [
] It fails in 1.20.5, but can be fixed by having the fully resolved paths: [
] |
Hi @ddignam . The documentation for compile_commands.json is unclear on whether the We can use this issue to ensure the behavior is consistent - either always relative to the workspace folder or relative to its location. (Using its current location would seem to be less ambiguous.) Though, since it's unclear what the correct behavior should be, I'd recommend not using a relative path in that field, as other tools may interpret it differently. I'd suggest also following up with an issue against LLVM asking for documentation to be updated to clarify the validity and behavior of relative paths in the |
directory
field of compile_commands.json
(spec is unclear)
Please make this default to workspace folder again. |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
Steps to reproduce:
Activate cpp file, expect intellisense to parse and find include files. Get this error, switching back to 1.19. 9 fixes the issue:
[5/8/2024, 8:05:56 AM] "XBYCSCreatePoolData.cpp" not found in "e:\ws\3dbyme/.vscode/compile_commands.json". 'includePath' from c_cpp_properties.json in folder '3DBYME' will be used for this file instead.
Expected behavior:
Configuration and Logs
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: