Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/lsp/protocol: avoid replying with non-nil interface values i…
…n case of error The JSON-RPC 2.0 protocol requires that responses objects have either a "result" or an "error", but not both. In Go, this corresponds to a non-nil result interface value or a non-nil error. However, the generated wrappers for the LSP protocol were passing non-nil values for both in case of error, due to passing typed-nil pointers as (non-nil) interfaces (see https://go.dev/doc/faq#nil_error). This change fixes the generator to explicitly pass only one or the other, and re-runs the generator at the existing commit. For golang/go#49387 For golang/go#46520 Change-Id: I582b52820bdac15d9f947e8d6c1e9daa70c53e40 Reviewed-on: https://go-review.googlesource.com/c/tools/+/388600 Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Cottrell <iancottrell@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
- Loading branch information