-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
updating compile_commands.json cause error message and indexing freezes. #4058
Comments
While I really want to thank the team for addressing this bug in 0.25.0-insiders, but I think there is still something that's causing issues. Perhaps, cpptools is picking up the changes while the compile_command.json is in the middle of being updated ? For example, our compile_commands.json is fairly large and it takes a little long to write it out. |
Could you repro this on your end ? fixing this would be such a tremendous productivity boost for us |
I'm not sure if we've reproed it yet -- but the fix might be to just set a timer (like we do with our mac crash file watcher) and/or later switch to using a different file watcher API -- VS Code added a vscode.workspace.fs API with 1.37, but that would require us taking a dependency on that newer version (but that API might have the same issue?). |
Are you able to check how many seconds it takes for your compile_commands.json to be written? Do you think waiting 5 seconds before processing the change would work? Would possibly delaying the update a few seconds longer than necessary be an issue for you? |
We have a potential fix at #4081 . |
The fix looks great given there is no other event such as "closed" being triggered by the fileWatcher. I checked your branch, and it does seem to resolve the problem. Thanks a lot! can't wait for this to see in a released version. |
The fix should be in 0.25.0-insiders2: https://github.com/microsoft/vscode-cpptools/releases/tag/0.25.0-insiders2 . Let us know if it doesn't work for you. |
Thanks a lot ! this is working fine now :) |
Describe the bug
To Reproduce
When you update compile_commands.json while vscode is running, cpptools gives out error saying ""${workspaceFolder}/compile_commands.json" could not be parsed. 'includePath' from c_cpp_properties.json will be used instead.", sometimes multiple times, and the indexing either takes very long or freezes (the red flame turns on indefinitely), which also freezes all code intellisense.
Expected behavior
cpptools should pick up changes in compile_commands.json after the file has been fully updated and re-indexing shouldn't freeze.
The text was updated successfully, but these errors were encountered: