Skip to content

Share a DiagnosticAnalyzerInfoCache between DiagnosticAnalyzerService and DiagnosticAnalyzerServiceQuickInfoProvider#63392

Merged
333fred merged 3 commits intodotnet:mainfrom
333fred:move-diagnosticanalyzerquickinfoprovider
Aug 16, 2022
Merged

Share a DiagnosticAnalyzerInfoCache between DiagnosticAnalyzerService and DiagnosticAnalyzerServiceQuickInfoProvider#63392
333fred merged 3 commits intodotnet:mainfrom
333fred:move-diagnosticanalyzerquickinfoprovider

Conversation

@333fred
Copy link
Copy Markdown
Member

@333fred 333fred commented Aug 14, 2022

In #60266, the CSharpDiagnosticAnalyzerServiceQuickInfoProvider was moved to the EditorFeatures layer because DiagnosticAnalyzerService was moved to the protocol layer, breaking MEF composition for the provider. This broke the feature in O#, however, and users reported OmniSharp/omnisharp-roslyn#2397. In investigating the service, I realized that the only thing the provider required is the cache from the DiagnosticAnalyzerService, which is a type that exists in the Workspaces layer. To fix this, I'm introducing shared export cache, so both quick info provider and analyzer service can share this instance, while allowing the provider to move back down to the features layer. Fixes OmniSharp/omnisharp-roslyn#2397.

For ease of review, I've split this into two commits. The first commit does the shared cache refactoring, and leaves the files in place. The second commit moves the files, and does not touch their contents.

… and DiagnosticAnalyzerServiceQuickInfoProvider

In dotnet#60266, the CSharpDiagnosticAnalyzerServiceQuickInfoProvider was moved to the EditorFeatures layer because DiagnosticAnalyzerService was moved to the protocol layer, breaking MEF composition for the provider. This broke the feature in O#, however, and users reported OmniSharp/omnisharp-roslyn#2397. In investigating the service, I realized that the only thing the provider required is the cache from the DiagnosticAnalyzerService, which is a type that exists in the Workspaces layer. To fix this, I'm introducing shared export cache, so both quick info provider and analyzer service can share this instance, while allowing the provider to move back down to the features layer. Fixes OmniSharp/omnisharp-roslyn#2397.
@333fred 333fred marked this pull request as ready for review August 16, 2022 05:34
@333fred 333fred requested a review from a team as a code owner August 16, 2022 05:34
@333fred 333fred enabled auto-merge (squash) August 16, 2022 05:34
@333fred 333fred merged commit dd2c297 into dotnet:main Aug 16, 2022
@ghost ghost added this to the Next milestone Aug 16, 2022
@333fred 333fred deleted the move-diagnosticanalyzerquickinfoprovider branch August 17, 2022 20:05
@dibarbet dibarbet modified the milestones: Next, 17.4 P2 Sep 1, 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.

SuppressMessage hover info seems to have regressed

3 participants