x/tools/gopls: Diagnostic's CodeDescription field with empty href
#42314
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What did you do?
Open a file that had diagnostics to be reported. For example:
What did you expect to see?
The diagnostics with either no
codeDescription
or acodeDescription
with anhref
field and non-empty value.What did you see instead?
Diagnostics with
{"codeDescription": {"href": ""}}
.To add a little more context: I'm not sure if that's being marshaled that way intentionally, but I get the impression that it wasn't what was intended, given that there's an
omitempty
tag on the field (https://github.com/golang/tools/blob/8dabb740183dd603f671da47324972b578eaf158/internal/lsp/protocol/tsprotocol.go#L1140), but that field being a (non-pointer) struct will never be omitted. As it is being sent right now it breaks at least LanguageClientNeovim, as it fails to deserialize that into an URL, given that the value is an empty string.The text was updated successfully, but these errors were encountered: