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

17.10: Cherry-pick fix for scenario where lightbulbs weren't being displayed #74760

Conversation

ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented Aug 14, 2024

Addresses https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2087100

The recent change to remove solution crawler has apparently caused some regressions in lightbulb functionality and performance. This PR attempts to address at least one functional issue introduced as part of that change.

Previously, during solution load, solution crawler would cause the analyzer state sets to update via IncrementalAnalyzerProcessor.LowPriorityProcessor.ProcessProjectAsync's call to DiagnosticIncrementalAnalyzer.AnalyzeProjectAsync. Similarly, document updates would update the analyzer states the crawler's idle processing.

Instead of trying to hook back in these calls, this PR instead changes the diagnostic analyzer service to no longer offer a TryGetDiagnosticsForSpanAsync, instead forcing users to use the GetDiagnosticsForSpanAsync instead. The only caller of TryGetDiagnosticsForSpanAsync was inside the CodeFixService, and it seems like that code should just go ahead and force correct results. Thus, there is no concept of a non-upToDate call into the diagnostic service.

I'm going to separately investigate an issue with the StateManager's statesets not getting updated. I'm unsure why the code doesn't update the statesets upon calculation, but the fact that we are now recreating this on every lightbulb request is at least partly responsible for the recent lightbulb perf regression.
@ToddGrun ToddGrun requested a review from a team as a code owner August 14, 2024 17:26
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 14, 2024
@ToddGrun ToddGrun requested a review from arunchndr August 14, 2024 17:26
@ToddGrun
Copy link
Contributor Author

Tagging @arkalyanms. There were a couple merge conflicts. I'm fairly confident in that I resolved them correclty, but it would be nice to get some verification that things are working as I haven't done any validation other than manual code inspection and building.

@CyrusNajmabadi
Copy link
Member

@arkalyanms We coudl take this, but my preference would be to just say: "this is fixed in 17.11. sorry, please move to that if this is affecting you".

@ToddGrun
Copy link
Contributor Author

@arkalyanms -- test failures, even on rerun, that don't appear to be related. Are tests on ci for the 17.10 branch in a working state?

@arunchndr
Copy link
Member

@arkalyanms We coudl take this, but my preference would be to just say: "this is fixed in 17.11. sorry, please move to that if this is affecting you".

17.10 is LTS and support last 2 years longer than 17.11, so we need the port.

@arunchndr
Copy link
Member

arunchndr commented Aug 20, 2024

@ToddGrun Integration CI failed again. If empty PR still fails, lets disable the test and create a bug. @jaredpar fyi as Box.

@jaredpar
Copy link
Member

This is a servicing branch, there isn't much of an expectation that integration tests will run here successfully given that they're running on VS latest, not 17.10. Generally we ignore them in servicing if we reasonably don't think they're related.

@ToddGrun
Copy link
Contributor Author

If empty PR still fails

Same tests fail in dummy PR: #74821

@arunchndr
Copy link
Member

If empty PR still fails

Same tests fail in dummy PR: #74821

Thanks for checking, merging PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE 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.

4 participants