-
Notifications
You must be signed in to change notification settings - Fork 230
Upgrade OmniSharp to 0.19.4. #4134
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
Conversation
- With the latest OmniSharp upgrade there were a few high profile changes:
- Most DTO's are records now which makes them immutable. You'll see throughout the codebase that we now have to use `with {...}` to translate one type to another.
- `ServerCapabilities` are expandable by default. This means we no longer need our `ExtendableServerCapabilities` type.
- Getting client and server capabilities in each of our endpoints are now a single method call. This resulted in lots of deleted code.
- O# upgraded its LSP version to 3.17 which means semantic tokens are no longer proposed. This resulted in a lot of warnings/obsolete bits getting removed. We now also have code action resolution as part of this upgrade so we could remove our old code action resolution endpoint (it's in VSCode now too).
- The way the O# serializer gets construed now is different and extendable. Because of this we now have a primary method to add all of our converters to an O# serializer.
- O# embraced the optional vs. required text document identifiers. This makes it super clear whenever we're expected to provided a document version or not. Probably one of my favorite changes in the upgrade.
- A new dependency of `System.Threading.Channels` was introduced so we had to make sure that was included in our VS scenarios.
- This changeset is in preparation for another O# release where we'll replace the [O# request invoker](OmniSharp/csharp-language-server-protocol#641) to get some pretty massive perf wins!
Fixes dotnet/aspnetcore#35622
davidwengier
left a comment
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.
LGTM
Out of curiosity, is this version of O# nullable annotated?
...Core.Razor.LanguageServer/CodeActions/CSharp/UnformattedRemappingCSharpCodeActionResolver.cs
Show resolved
Hide resolved
src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionEndpoint.cs
Show resolved
Hide resolved
...Microsoft.AspNetCore.Razor.LanguageServer/CodeActions/Models/OmniSharpVSCodeActionContext.cs
Outdated
Show resolved
Hide resolved
...Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Serialization/LspSerializerExtensions.cs
Outdated
Show resolved
Hide resolved
ryanbrandenburg
left a comment
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 good. Some small quibbles, but mostly want to be sure that we've run it through the paces in the experimental instance. If I recall last time there were some problems which didn't show in our tests, only in functional usage.
src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/RazorCompletionEndpoint.cs
Show resolved
Hide resolved
src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageServer.cs
Show resolved
Hide resolved
...r/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Models/RazorSemanticTokensLegend.cs
Outdated
Show resolved
Hide resolved
...Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Serialization/LspSerializerExtensions.cs
Outdated
Show resolved
Hide resolved
Yes! |
- Set => Init - Removal of semantic token legend endpoint - Some refactoring in our serializer extensions - Test fixups
|
🆙 📅 If all looks good i'll get in. @allisonchou looks like latest O# also has a linked editing range handler too 😄 |
|
@NTaylorMullen perfect! Then I can get rid of the extra classes I added 😄 |
|
Hello @NTaylorMullen! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|

with {...}to translate one type to another.ServerCapabilitiesare expandable by default. This means we no longer need ourExtendableServerCapabilitiestype.System.Threading.Channelswas introduced so we had to make sure that was included in our VS scenarios.Fixes dotnet/aspnetcore#35622
/cc @ToddGrun @jimmylewis