Skip to content

Comments

Include Enc diagnostics in Razor requests#81941

Merged
davidwengier merged 1 commit intodotnet:mainfrom
davidwengier:RazorEncDiagnostics
Jan 12, 2026
Merged

Include Enc diagnostics in Razor requests#81941
davidwengier merged 1 commit intodotnet:mainfrom
davidwengier:RazorEncDiagnostics

Conversation

@davidwengier
Copy link
Member

Most of dotnet/razor#12661

I just missed this when I first did cohosting diagnostics.

@davidwengier davidwengier requested a review from a team January 9, 2026 04:15
@davidwengier davidwengier requested a review from a team as a code owner January 9, 2026 04:15
davidwengier added a commit to dotnet/razor that referenced this pull request Jan 9, 2026
…2664)

Fixes #12661 (along with
dotnet/roslyn#81941 that actually makes the
diagnostics get reported)

No tests because the existing C# tests cover everything, and there is no
reasonable way to get Roslyn to create an ENC diagnostic in a test IMO.
public static IDiagnosticSource CreateOpenDocumentSource(Document document)
=> new OpenDocumentSource(document);

internal static Task<ImmutableArray<DiagnosticData>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken)
Copy link
Contributor

Choose a reason for hiding this comment

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

why have this helper if you alread hve exposed GetDiagnosticsAsync(doc, ct) publicly?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh. i see. there are two classes here. one nested in the other. ok.

@davidwengier davidwengier merged commit 9f83e1e into dotnet:main Jan 12, 2026
27 checks passed
@davidwengier davidwengier deleted the RazorEncDiagnostics branch January 12, 2026 11:40
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jan 12, 2026
@davidwengier davidwengier modified the milestones: Next, 18.4 Jan 27, 2026
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