You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A stopping language server is sent requests, such as textDocument/codeLens, after its shutdown request #2145
A language server that is stopping can be sent a request after its shutdown request. The LSP specification says that, once the client has sent shutdown, it sends nothing but the exit notification.
CancelRequestAfterShutdownTest.testARequestCancelledOnceTheShutdownIsSentSendsNoCancelRequest caught it on main's CI at 1e40358 (run 45186700307, Linux, IntelliJ 2024.2):
junit.framework.AssertionFailedError: The language server must read nothing but exit after shutdown
expected:<[shutdown, exit]> but was:<[shutdown, textDocument/codeLens, exit]>
The editor's background textDocument/codeLens request went out after shutdown. The next commit's CI passed, so it depends on timing.
Why
#2105 stops a stopping language server from being sent $/cancelRequest once shutdown is queued (OutgoingMessages in LanguageServerWrapper). A request that a feature starts while the server stops, as Code Vision's code lens, still goes out.
Expected
Once shutdown is queued, nothing but exit is written to the language server. A request made after that ends at once, as the requests of a stopped language server do.
The test also doesn't switch off Code Vision, as #2120 did for a similar race. But the language server must not be sent the request whatever starts it.
Activity
fix: send a stopping language server nothing but exit after its shutd…