Skip to content

Conversation

@davidwengier
Copy link
Member

Fixes #12276 again
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2633418

Commit-at-a-time is thoroughly recommended.

Commits 1-4 expose a DocumentExcerpt service that Roslyn can use to provide nice results in FAR etc., because without the code-gen changes, the generated code is pretty ugly.
Commit 5 "reverts" #12486, bringing #12287 back but without any changes to the code-gen this time, just a new source mapping.
Commit 6 is test baseline updates (only source mappings, no .cs files)
Commit 7 removes the requirement for line pragmas to exactly match source mappings. I left the rest of the validation though
Commit 8 bumps us to a new Roslyn with the new document excerpt services.

@davidwengier davidwengier requested a review from a team as a code owner November 18, 2025 06:40
var offset = nonGenericTypeName.Span.StartsWith('@')
? 1
: 0;
context.AddSourceMappingFor(node.StartTagSpan, offset);
Copy link
Member Author

Choose a reason for hiding this comment

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

This line is the only one that is different from #12287. In that PR, it was BuildEnhancedLinePragma:

using (context.BuildEnhancedLinePragma(node.StartTagSpan, offset))
{
context.CodeWriter.Write(nonGenericTypeName);
}

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.

GoToDef doesn't work on component name when implemented in C#

2 participants