-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Closing a document brings back stale diagnostics #70042
Comments
What would you expect if you close the file in step 5 without saving? |
the diagnostic would be gone. you'd have to rebuild to get it again. we don't track the impacts of mutations (it's nearly impossible, since any change anywhere can have impacts on diagnostics everywhere). so you might change code in a different file which fixes the diag in this file, save it, then not save this file that contains the diagnostic. That shouldn't bring the diagnostic back. This is the experience in roslyn today, and it's fine. Things always move forward. Builds represent results for an event in the past. And even if varying changes happen (or get tossed) past that point, it still represents the past, and may have to to be rerun to represent the present. |
The latest dogfooding build should now match the expected behavior. |
Thanks @kayle ! |
@kayle @CyrusNajmabadi The original issue described by @sharwell seems to be fixed in the latest build. However, I am seeing duplicate and stale diagnostics with Full solution analysis enabled. See the repro below: |
Thanks @mavasani - I can fix that issue. What do you expect after closing the document? Currently the warning will go away until the next workspace request regenerates it. |
That is my expectation. "Latest wins". So the document superseded the workspace. Until workspace runs again, the warning will be gone. |
@kayle can you link to your PR for this? I'd like to close this out. Thanks! |
Fixed with https://devdiv.visualstudio.com/DevDiv/_git/VS-Platform/pullrequest/503146. Thanks! |
Version Used:
Steps to Reproduce:
Expected Behavior:
Actual Behavior:
The text was updated successfully, but these errors were encountered: