-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cohosting completion and code actions #11619
Merged
Merged
Conversation
This file contains 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
ryzngard
approved these changes
Mar 13, 2025
DustinCampbell
approved these changes
Mar 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good to me
davidwengier
added a commit
to dotnet/roslyn
that referenced
this pull request
Apr 1, 2025
Part of dotnet/razor#10693 Razor side of this is dotnet/razor#11619 which I think makes us ready to internally dogfood cohosting. This unblocks Razor completion and most of code actions in cohosting. It allows `WithText` and `WithSyntaxRoot` to work on source generated documents, creating a forked solution with frozen source generated documents. Solutions can be continually frozen without issue, and unfreezing puts them back to their original state. This also allows code actions to run on modified source generated documents, but only if they have been frozen. As discussed there aren't any flags for this to only be possible from/for Razor. Still investigating individual code actions that aren't working in Razor, but those will probably be a follow up. Enough of the Razor tests pass now that it proves the system generally works (see comment below).
# Conflicts: # src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/ProjectExtensions.cs # src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/SolutionExtensions.cs # src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostRenameEndpointTest.cs
davidwengier
added a commit
that referenced
this pull request
Apr 12, 2025
First two commits are from #11619, and like that PR this won't merge (or pass tests) until dotnet/roslyn#77587 merges and is available, but the code won't need to change, and I've manually tested and everything works, and all tests pass on my machine. The power of "Trust me bro!" Fixes #11101 Fixes #11138 Fixes #10697 Fixes #10947 I managed to stop myself doing anything other than porting resolve, but I learned a lot doing it, most of which horrified me, so will hopefully be able to do more cleanup later. Would be nice if we got to a state where I didn't have to keep saying "this doesn't build yet" first though :P Commit at a time review will make it easier, but I admit I didn't do a great job here, and the 2nd last commit is definitely in "draw the rest of the owl" territory. This code was written, ported to a branch, then ported to another branch, then written more and by two different people, so it didn't stand much of a chance I'm afraid.
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 #10693
Not a lot in the way of code changes here, its mostly just unskipping tests. Those tests won't pass until dotnet/roslyn#77587 is merged and available, but this PR leaves only 5 tests skipped in cohosting, which probably puts us in a position to internally dogfood.