mirror of
https://github.com/golang/go
synced 2024-11-18 18:44:42 -07:00
3ded1b734d
Switch the command line client, and its tests, away from the hardcoded 30-second timeout and to a newly-added custom request. Inconveniently for us, the jsonrpc2 package only serializes requests, not replies. (Notifications are requests for this purpose.) So, for a flow like this: diagnoseFiles --> <-- publishDiagnostics <-- publishDiagnostics diagnoseFiles <-- (reply) ...there's actually no guarantee that the incoming requests will be processed before the reply comes in -- it gets to jump the serialization. The only way to guarantee previous notifications have been processed is to send another request. I didn't feel like adding nonstandard notification support, so I just send a fake diagnostic. Error handling for untyped JSON is hideous so for now we just panic. Nobody else should be calling these, or if they do it's at their own risk. Fixes golang/go#36518. Change-Id: I63f8df5bb627c9783314a0d38d2dac8721b3c320 Reviewed-on: https://go-review.googlesource.com/c/tools/+/214583 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
test | ||
capabilities_test.go | ||
check.go | ||
cmd_test.go | ||
cmd.go | ||
definition.go | ||
export_test.go | ||
folding_range.go | ||
format.go | ||
highlight.go | ||
implementation.go | ||
imports.go | ||
info.go | ||
links.go | ||
query.go | ||
references.go | ||
rename.go | ||
serve.go | ||
signature.go | ||
suggested_fix.go | ||
symbols.go |