Skip to content

Skip unmappable source-generated document edits in rename#83080

Draft
dibarbet wants to merge 1 commit intodotnet:mainfrom
dibarbet:rename-generated-razor
Draft

Skip unmappable source-generated document edits in rename#83080
dibarbet wants to merge 1 commit intodotnet:mainfrom
dibarbet:rename-generated-razor

Conversation

@dibarbet
Copy link
Copy Markdown
Member

@dibarbet dibarbet commented Apr 6, 2026

When ISourceGeneratedDocumentSpanMappingService.CanMapSpans returns false for a source-generated document, skip those edits instead of returning them with roslyn-source-generated:// URIs that the client cannot open. The source generator will re-run and produce updated output once the regular document edits are applied.

Related to #83078

Microsoft Reviewers: Open in CodeFlow

…unavailable

Only include Razor source-generated documents in rename locations when
ISourceGeneratedDocumentSpanMappingService can map their spans. Without a
mapping service, the edits would produce roslyn-source-generated:// URIs
that clients cannot open. The generator will re-run and produce updated
output once the regular document edits are applied.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dibarbet dibarbet force-pushed the rename-generated-razor branch from 1232b27 to ed27d49 Compare April 6, 2026 20:47
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