vscode-cpptools
vscode-cpptools copied to clipboard
Code analysis stop working (until Reload Window) if a save is done that fails while code analysis is running (and save shouldn't fail)
- Run code analysis on some file.
- Make some edit and save to some file that is locked for editing by clang-tidy. You should get a file save failed notification from VS Code.
- Cancel code analysis (optional, it should repro the bug even if you wait till it finishes).
- Run code analysis again.
Bug: Code analysis never actually runs and is stuck in a running state (internally it's waiting for the save of the file that never arrived). The code expected that a willSaveWaitUntil will always be followed by a save.
Oh, looks like the "root" (or 2nd) bug is that the save shouldn't fail and there's a problem canceling the code analysis when the willSaveWaitUntil is called.
Doing a successful save while code analysis is running might be a workaround though (not sure yet)...
This can repro (VS Code not sending a didSave) even if the save doesn't fail (i.e. a save of a non-dirty file).