Skip to content

Add source mapping for @rendermode#12592

Closed
davidwengier wants to merge 10 commits intodotnet:dev/dawengie/RenderModeWithTypeParamfrom
davidwengier:dev/dawengie/RenderModeSourceMapping
Closed

Add source mapping for @rendermode#12592
davidwengier wants to merge 10 commits intodotnet:dev/dawengie/RenderModeWithTypeParamfrom
davidwengier:dev/dawengie/RenderModeSourceMapping

Conversation

@davidwengier
Copy link
Member

Based on #12590 because I needed the new language version. Will merge that first, then rebase this, obv.

Fixes #10668

@davidwengier davidwengier requested a review from a team as a code owner December 12, 2025 05:51
: IntermediateNodeFactory.CSharpToken(
content: directiveToken.Content,
// To avoid breaking hot reload, we don't map the content back to the source unless we're on Razor 10 or higher
source: codeDocument.ParserOptions.LanguageVersion >= RazorLanguageVersion.Version_10_0
Copy link
Member Author

@davidwengier davidwengier Dec 12, 2025

Choose a reason for hiding this comment

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

Rather than gating this on a language version, we could just add a source mapping and not a line directive for these, which would solve the problem in the IDE, but wouldn't solve CLI build diagnostics (which are presumably broken), and would mean adding a new property to IntermediateNode so wanted to see if anyone cared first.

@davidwengier davidwengier deleted the branch dotnet:dev/dawengie/RenderModeWithTypeParam December 16, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant