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
There are a number of places in the LSP where []T is
required and nil is unacceptable. This change attempts
to ensure that gopls generates the correct data.
The change would like to use a generic function,
but instead uses 4 functions, one for each of string, TextEdit,
DiagnosticTag, and CompletionItemTag.
There are also many places that call for []T, but nil is
acceptable, as the json tag include 'omitempty'. These
don't need any changes.
This change corrects the existing code,
but changes in either gopls or the LSP could introduce new
instances of the bug.
On the other hand, this bug has been present for a long time,
and was only now found, by a strict LSP client that didn't
use semantic tokens.
Fixes: golang/go#59479
Change-Id: I00f30e6b50eaf7768bc6c39859c64dc350181f20
Reviewed-on: https://go-review.googlesource.com/c/tools/+/483216
gopls-CI: kokoro <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Peter Weinberger <[email protected]>
0 commit comments