Skip to content

BackgroundAnalysisScope enhancements#57172

Merged
mavasani merged 30 commits intodotnet:mainfrom
mavasani:BackgroundAnalysisScope
Feb 11, 2022
Merged

BackgroundAnalysisScope enhancements#57172
mavasani merged 30 commits intodotnet:mainfrom
mavasani:BackgroundAnalysisScope

Conversation

@mavasani
Copy link
Copy Markdown
Contributor

@mavasani mavasani commented Oct 15, 2021

Closes #57146

  1. Adds BackgroundAnalysisScope.None for compiler diagnostics only editing experience.
  2. Changes semantics of BackgroundAnalysisScope.ActiveFile so we execute compiler analyzer for all open files and remaining analyzers for the active file.
  3. Add a feature flag/experiment to switch BackgroundAnalysisScope.ActiveFile to be the default scope. We will turn this experiment on for Roslyn team to enable dogfooding the experience with the new mode.

[Still under discussion] A separate follow-up PR will add an experiment to switch BackgroundAnalysisScope.ActiveFile to be the default scope.

… ActiveFile background analysis scope is enabled. This is required because a top level change in ActiveFile mode would have cleared all analyzer diagnostics for non-active documents and persisted empty diagnostics state for those documents, and we need to reset that state on active document changed to ensure up-to-date analyzer diagnostics are shown for newly active document.
@mavasani mavasani changed the title BackgroundAnalysisScope enhancements (Part 1) BackgroundAnalysisScope enhancements Oct 20, 2021
@mavasani
Copy link
Copy Markdown
Contributor Author

@dotnet/roslyn-ide Ping for reviews.

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Adds BackgroundAnalysisScope.None for compiler diagnostics only editing experience.

How does this surface to the user?

Comment thread src/Features/Core/Portable/SolutionCrawler/IncrementalAnalyzerBase.cs Outdated
@sharwell sharwell dismissed their stale review January 28, 2022 22:23

Will remove Razor workarounds in immediate follow-up

mavasani and others added 4 commits January 31, 2022 10:48
…ementalAnalyzer.Executor.cs

Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
…ementalAnalyzer.Executor.cs

Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
…ementalAnalyzer.Executor.cs

Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
@mavasani
Copy link
Copy Markdown
Contributor Author

@CyrusNajmabadi @sharwell All comments should be addressed now. Thanks!

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

I'm likely ok with this if Sam is ok :)

Copy link
Copy Markdown
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm signing off. But this needs a second signoff from @sharwell :)

Comment thread src/Features/Core/Portable/Workspace/BackgroundParser.cs
Comment thread src/Features/Core/Portable/Workspace/BackgroundCompiler.cs
Comment thread src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs
Comment thread src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs
@mavasani mavasani enabled auto-merge February 10, 2022 06:39
@mavasani mavasani merged commit 717ff0d into dotnet:main Feb 11, 2022
@ghost ghost added this to the Next milestone Feb 11, 2022
@mavasani mavasani deleted the BackgroundAnalysisScope branch February 11, 2022 03:14
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
@ryzngard ryzngard added UX Review Not Required UX Review Not Required and removed Needs UX Triage labels Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BackgroundAnalysisScope enhancements

10 participants