Skip to content
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

Ensure diagnostics refresh when source generators run in balanced mode #77271

Merged
merged 4 commits into from
Feb 20, 2025

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented Feb 19, 2025

Fixes an issue where diagnostics would not refresh when source generators run in balanced mode (e.g. after a save triggers sg re-run, diagnostics would not update based on the new sg contents).

checksum changes taken from #77273

Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Feb 19, 2025
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@CyrusNajmabadi
Copy link
Member

Not connected to a computer right now. But I'm trying to figure out how oop syncing works properly of we're not combining the sg-version info into the project checksum.

Or, if we are properly adding the sg-version to the syncing checksum, but not the dep checksum, then I think the bug is as you mentioned and the dep checksum should update.

The dep checksum means: is this project substantively different when examined for syntax or semantics. In this case the answer is "yes" if SGs need to rerun.

That said, if we update the checksum, we should audit ask the users of it to make sure that remains sensible in balanced mode. I'm thinking it will. But we don't want to mess up some other part of the system.

@CyrusNajmabadi
Copy link
Member

oh i see. teh SourceGenExMap is stored at the solution level, and is a mapping from proj-id to version. so checksum doesn't contain it. i remember this being so checksum was pure data, and no host state.

so yes, we need out of band info for this.

@dibarbet dibarbet marked this pull request as ready for review February 19, 2025 21:08
@dibarbet dibarbet requested a review from a team as a code owner February 19, 2025 21:08
@dibarbet dibarbet merged commit 4c13f50 into dotnet:main Feb 20, 2025
25 checks passed
@dibarbet dibarbet deleted the sg_diagnostics branch February 20, 2025 01:03
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants