mirror of
https://github.com/golang/go
synced 2024-11-18 16:14:46 -07:00
0fd2d649e6
Add a new Forwarder type to the lsprpc package, which implements the jsonrpc2.StreamServer interface. This will be used to establish some parity in the implementation of shared and singleton gopls servers. Much more testing is needed, as is handling for the many edge cases around forwarding the LSP, but since this is functionally equivalent to TCP forwarding (and the -remote flag was already broken), I went ahead and used the Forwarder to replace the forward method in the serve command. This means that we can now use the combination of -listen and -remote to chain together gopls servers... not that there's any reason to do this. Also, wrap the new regression tests with a focus on expressiveness when testing the happy path, as well as parameterizing them so that they can be run against different client/server execution environments. This started to be sizable enough to warrant moving them to a separate regtest package. The lsprpc package tests will instead focus on unit testing the client-server binding logic. Updates golang/go#36879 Updates golang/go#34111 Change-Id: Ib98131a58aabc69299845d2ecefceccfc1199574 Reviewed-on: https://go-review.googlesource.com/c/tools/+/218698 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> |
||
---|---|---|
.. | ||
browser | ||
cache | ||
cmd | ||
debug | ||
diff | ||
fake | ||
fuzzy | ||
helper | ||
lsprpc | ||
mod | ||
protocol | ||
regtest | ||
snippet | ||
source | ||
telemetry | ||
testdata | ||
tests | ||
code_action.go | ||
command.go | ||
completion_test.go | ||
completion.go | ||
definition.go | ||
diagnostics.go | ||
folding_range.go | ||
format.go | ||
general.go | ||
highlight.go | ||
hover.go | ||
implementation.go | ||
link.go | ||
lsp_test.go | ||
references.go | ||
rename.go | ||
reset_golden.sh | ||
server_gen.go | ||
server.go | ||
signature_help.go | ||
symbols.go | ||
text_synchronization.go | ||
workspace_symbol.go | ||
workspace.go |