Restore fully qualify for Razor#80674
Merged
davidwengier merged 1 commit intodotnet:mainfrom Oct 13, 2025
Merged
Conversation
| if (document.Id.IsSourceGenerated) | ||
| // possible, and we don't need to make pointless calls to oop to compute things. The exception is Razor | ||
| // which uses generated documents, but does its own mapping of changes back to the original source. | ||
| if (document.Id.IsSourceGenerated && !document.IsRazorSourceGeneratedDocument()) |
Contributor
There was a problem hiding this comment.
is it possible to have a test for this? (perhaps in teh razor codebase?)
Member
Author
There was a problem hiding this comment.
Yeah, we have unit and integration tests in Razor for this. The former isn't very helpful, because we don't automatically consume new versions of Roslyn, but we'd find out eventually I guess. Integration tests would show have caught this as soon as Roslyn merged to main (assuming they weren't on the floor, and seemingly trying to burrow their way down, but thats temporary I hope!)
CyrusNajmabadi
approved these changes
Oct 13, 2025
This was referenced Oct 17, 2025
This was referenced Oct 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes dotnet/razor#12315
#80649 disabled Fully Qualify for source generated documents because it was crashing for users. In actual fact the crash was already fixed in #77587:
roslyn/src/Workspaces/Remote/ServiceHub/Services/FullyQualify/RemoteFullyQualifyService.cs
Lines 30 to 31 in d2b50b6
It still probably makes sense to not run the code action on normal source generated documents. Razor documents are not normal.