Skip to content

Unify Razor diagnostics to a single endpoint - #85867

Open
davidwengier wants to merge 2 commits into
dotnet:mainfrom
davidwengier:razor-diagnostics
Open

davidwengier wants to merge 2 commits into
dotnet:mainfrom
davidwengier:razor-diagnostics

Conversation

@davidwengier

@davidwengier davidwengier commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Follow up to #85702

Now that all diagnostics are on public protocol types, we can simplify our implementation into one endpoint, rather than having a base class and two client-specific child classes with generics and other hoops.

Unfortunately the diff doesn't look great on GitHub because it doesn't recognize either endpoint deletion as being a rename. Sorry.

Microsoft Reviewers: Open in CodeFlow

@davidwengier
davidwengier requested review from a team and a balanced review from Copilot October 1, 2026 05:20
@davidwengier
davidwengier requested a review from a team as a code owner October 1, 2026 05:20
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The cross-host refactor appears coherent, but relevant CI and targeted validation have not completed.

Review effort: Balanced
Findings: None

What changed in this PR

Unifies Razor pull diagnostics behind one shared endpoint while retaining host-specific registration and behavior.

Changes:

  • Replaces the generic base and two host endpoints with one capability-aware endpoint.
  • Moves common tests into the shared suite and adds host-specific metadata checks.
  • Separates VS and VS Code dynamic registration.
File Description
Microsoft.VisualStudioCode.RazorExtension.UnitTests/​.../​CohostDocumentPullDiagnosticsTest.cs Adds VS Code metadata validation.
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests/​.../​CohostDocumentPullDiagnosticsTest.cs Retains VS-specific tests and metadata validation.
Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests/​.../​CohostDocumentPullDiagnosticsTest.cs Centralizes shared endpoint tests and helpers.
Microsoft.VisualStudioCode.RazorExtension/​.../​DocumentPullDiagnosticsRegistration.cs Adds VS Code diagnostic registration.
Microsoft.VisualStudioCode.RazorExtension/​.../​DocumentPullDiagnosticsEndpoint.cs Removes the VS Code-specific endpoint.
Microsoft.VisualStudio.LanguageServices.Razor/​.../​CohostDocumentPullDiagnosticsRegistration.cs Adds VS diagnostic registrations.
Microsoft.VisualStudio.LanguageServices.Razor/​.../​CohostDocumentPullDiagnosticsEndpoint.cs Removes the VS-specific endpoint.
Microsoft.CodeAnalysis.Razor.CohostingShared.projitems Includes the unified endpoint.
.../​CohostDocumentPullDiagnosticsEndpointBase.cs Removes the generic base endpoint.
.../​CohostDocumentPullDiagnosticsEndpoint.cs Implements unified capability-aware diagnostics.
.github/​memory/​testing/​razor.md Documents host-specific test placement.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants