Updates to compile_commands.json are not handled if specified using a relative path #7610
Labels
bug
Feature: Compile Commands
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
quick fix
Milestone
If I specify
compileCommands
like so:"compileCommands": "build/compile_commands.json"
.. it seems to work as expected, however changes to the file are not (always?) handled properly.
If I specify it like so:
"compileCommands":"${workspaceFolder}/build/compile_commands.json"
.. it appears to work as expected, including when changes are made.
It looks like we're resolving this path to within the workspace directory in some cases, but not in others. If the current working directory is different, the file is looked for there. This should either default to always resolving as relative to the workspace folder if not a full path (after variables like
${workspaceFolder}
are expanded). Or, it should result in a squiggle inc_cpp_properties.json
.We had added some additional checking for changes to compile_commands.json, to address user reports that changes were not always being handled properly. This is likely the actual cause, and that additional handling could potentially be removed.
The text was updated successfully, but these errors were encountered: