go/internal/jsonrpc2
Ian Cottrell fcc5b64fe1 internal/jsonrpc2: don't set result in response if there is an error
Marshalling an empty raw message produces a null rather than omitting the field
Instead we do not set the field unless there is no error.
Includes a test that reproduced the issue before the fix.

Fixes golang/go#39719

Change-Id: I683b8ea55d3425613fc956993280ff51202f49fc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/239097
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-06-22 15:00:58 +00:00
..
servertest internal/jsonrpc2/servertest: replace closerList with connList 2020-06-18 12:08:28 +00:00
conn.go internal/jsonrpc2: change jsonrpc2.Conn to be an interface 2020-06-03 17:06:45 +00:00
handler.go internal/event: renaming the main event API functions 2020-04-23 17:21:36 +00:00
jsonrpc2.go internal/jsonrpc2: change jsonrpc2.Conn to be an interface 2020-06-03 17:06:45 +00:00
jsonrpc2_test.go internal/jsonrpc2: change jsonrpc2.Conn to be an interface 2020-06-03 17:06:45 +00:00
messages.go internal/jsonrpc2: don't set result in response if there is an error 2020-06-22 15:00:58 +00:00
serve.go internal/jsonrpc2: try to suppress unnecessary errors on shutdown 2020-06-11 19:17:06 +00:00
serve_test.go internal/stack: add the leak test 2020-05-27 14:25:42 +00:00
stream.go internal/jsonrpc2: switch to building streams on top of net.Conn 2020-06-03 13:12:18 +00:00
wire.go internal/lsp: fix broken lsp logs 2020-04-21 17:00:05 +00:00
wire_test.go internal/jsonrpc2: don't set result in response if there is an error 2020-06-22 15:00:58 +00:00