Conversation
DustinCampbell
left a comment
There was a problem hiding this comment.
Looks good to me. Do we expect an image load regression with this change? If so, have we reached out for a permanent exception?
This will be a regression but we only need a temporary exception. This helps get rid of the |
davidwengier
left a comment
There was a problem hiding this comment.
Guessing this is waiting on a Roslyn insertion merge, right? Me too! Saves me updating my PRs at least :D
This will be a dual insertion, just had to wait for the EA packages to be published. |
The RoslynLanguageServer in the latest Microsoft.CodeAnalysis.LanguageServer.Protocol.dll doesn't exit gracefully when the JsonRpc it's listening to is forcibly disconnected. Unfortunately, that's exactly how our CSharpTestLspServer shuts down the RoslynLanguageServer that it creates. Ultimately, the Razor EA should be updated to provide a IAsyncDisposable implementation that can be called to gracefully shut down the language server. However, in the meantime, this change uses reflection to get at the underlying RoslynLanguageServer and call ShutdownAsync and ExitAsync on it before disposing the server-side JsonRpc.
Fix CSharpTestLspServer disposal to gracefully shutdown RoslynLanguageServer
This reverts commit ac21bbe.
Requires dotnet/roslyn#78069