-
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
Use the Roslyn project system for generating code for open documents #9831
Use the Roslyn project system for generating code for open documents #9831
Conversation
@@ -20,6 +20,7 @@ | |||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(MicrosoftCodeAnalysisWorkspacesCommonPackageVersion)" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsPackageVersion)" /> | |||
<PackageReference Include="Microsoft.Extensions.NonCapturingTimer.Sources" Version="$(MicrosoftExtensionsNonCapturingTimerSourcesPackageVersion)" PrivateAssets="all" /> | |||
<PackageReference Include="Microsoft.VisualStudio.LanguageServer.Protocol" Version="$(MicrosoftVisualStudioLanguageServerProtocolPackageVersion)" /> |
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.
This used to come in as a transitive dependency from Roslyn I suppose, but they no longer reference it.
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.
This used to come in as a transitive dependency from Roslyn I suppose, but they no longer reference it.
Yeah, that makes sense.
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.
Looks great to me, once the Roslyn version is bumped.
@@ -20,6 +20,7 @@ | |||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(MicrosoftCodeAnalysisWorkspacesCommonPackageVersion)" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsPackageVersion)" /> | |||
<PackageReference Include="Microsoft.Extensions.NonCapturingTimer.Sources" Version="$(MicrosoftExtensionsNonCapturingTimerSourcesPackageVersion)" PrivateAssets="all" /> | |||
<PackageReference Include="Microsoft.VisualStudio.LanguageServer.Protocol" Version="$(MicrosoftVisualStudioLanguageServerProtocolPackageVersion)" /> |
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.
This used to come in as a transitive dependency from Roslyn I suppose, but they no longer reference it.
Yeah, that makes sense.
...rc/Microsoft.VisualStudio.LanguageServerClient.Razor/Cohost/CohostTextDocumentSyncHandler.cs
Outdated
Show resolved
Hide resolved
I lucked into picking up a bunch of breaking changes in CLaSP with the update, so it is taking a little longer than I'd have hoped. Will probably ask for a re-review when its done, just as a sanity check :) |
Apologies folks, but this PR just got a lot bigger, so @ryzngard and @DustinCampbell please have another look over the most recent commits. There were a bunch of changes in CLaSP that had to be responded to, as well as Roslyn moving to their own protocol types for LSP which broke a bunch of tests, and only has a hacky fix for now. Note that the Roslyn version being referenced here is probably not the final one, if we want to match what goes into VS, that depends on which insertion PR actually gets in to VS, and at the moment I can't really merge this, as our integration tests will fail until the Roslyn insertion is merged, and available in a build. |
|
...or/test/Microsoft.AspNetCore.Razor.Test.Common.Tooling/LanguageServer/CSharpTestLspServer.cs
Show resolved
Hide resolved
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.
Still looking good to me.
CLaSP changes are being reverted in dotnet/roslyn#71726. Looks like this PR will be a gift that keeps on giving :) |
39dc990
to
2efe53c
Compare
Part of #9519
Right now code generation, in co-hosting and non, comes from document snapshots in the Razor project system which directly call the Razor compiler. This change means that all Html and C# code generation in co-hosting is done based on the TextDocument, which means it will come from the source generator when that part is ready.
This is the Razor side of, and needs a Roslyn bump to, dotnet/roslyn#71671