vscode-cpptools icon indicating copy to clipboard operation
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)

Open sean-mcmanus opened this issue 1 year ago • 2 comments

  1. Run code analysis on some file.
  2. 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.
  3. Cancel code analysis (optional, it should repro the bug even if you wait till it finishes).
  4. 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.

sean-mcmanus avatar Sep 17 '24 00:09 sean-mcmanus

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.

sean-mcmanus avatar Sep 17 '24 00:09 sean-mcmanus

Doing a successful save while code analysis is running might be a workaround though (not sure yet)...

sean-mcmanus avatar Sep 17 '24 00:09 sean-mcmanus

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).

sean-mcmanus avatar Oct 25 '24 20:10 sean-mcmanus