Skip to content

x/tools/gopls: reduce noisy log and error messages #66746

@findleyr

Description

@findleyr

This is an umbrella issue for work to reduce the number of noisy log and error messages produced by gopls.

Some of these have separate issues (e.g. #56395), but generally speaking gopls has grown far too chatty. In part, I think this has happened over time as Go calling semantics have leaked into LSP calling semantics. In a Go function, if I ask a for e.g. signatureHelp, and a function can't produce signatureHelp, it will typically return an error, perhaps with a sentinel value that indicates "there's no signature here". But in many LSP clients (including VS Code), all RPC errors are included in the server output.

In the past, I think errors have been suppressed in an ad-hoc manner, and we don't have a lot of tests that operations don't return an error.

We should enforce the semantics that an expected failure to produce a result is not an error. This issue tracks:

  • doing another pass through the code to eliminate noisy errors
  • adding tests for the non-existence of errors
  • also reducing superfluous log messages, or guarding them behind -verbose

CC @adonovan

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions