/ go Public
x/tools/gopls: support textDocument/diagnostic #60122
Issues related to the Go language server, gopls.
This label describes issues relating to any tools in the x/tools repository.
gopls commands use a
gopls/diagnoseFiles"non standard request" to implement file diagnostics for commands and testing. Unfortunately, this still publishes diagnostics asynchronously, and so suffers from syncronization problems (e.g. #59475).
There is now a
textDocument/diagnosticLSP method that does exactly what we want: return diagnostics for a requested file. We should implement this method and use it instead.
Furthermore, we should remove support for non-standard requests.
workspace/executeCommandis a better extensibility mechanism.
textDocument/diagnosticshould be done with some care: if we advertise this capability, some clients may start requesting diagnostics rather than letting gopls compute them asynchronously. This may have lifecycle and performance implications.
The text was updated successfully, but these errors were encountered: