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
Workspace diagnostics stop when the server cancels a pull itself #2027
WorkspaceDiagnosticManager pulls again after a ContentModified answer, or after ServerCancelled unless its data says not to retrigger. Any other error stops the pulls until the next workspace/diagnostic/refresh or registration, so that a server that fails the method isn't asked over and over.
A server built on LSP4J has no way to answer ServerCancelled for a pull it cancels itself, such as one that newer work supersedes: LSP4J answers RequestCancelled for any request whose future the server cancels (RemoteEndpoint.handleRequest), not only for one the client cancelled. LSP4IJ takes that answer as a failure, logs "Workspace diagnostics stopped" and stops pulling, so the diagnostics of closed files go stale until the server refreshes.
A pull that LSP4IJ cancels completes at once with a CancellationException, and a late answer to it is ignored. So a RequestCancelled answer that reaches shouldRetrigger always comes from a server that cancelled the pull itself, and pulling again is as safe as after ServerCancelled.
Found while moving xtclang/xvm to LSP4IJ 0.30.1. Its LSP4J server answers RequestCancelled for pulls it cancels itself; in its playbook runs a refresh has followed each such answer, which started the pulls again, so a stall hasn't shown there. A server that cancels a pull without a refresh stops getting pulls.
Activity
fix: pull workspace diagnostics again when the server cancels a pull …