1
0
mirror of https://github.com/golang/go synced 2024-10-01 03:38:32 -06:00
go/internal/lsp/lsprpc
Rob Findley c4d4ea9c79 internal/lsp/cache: return concrete types where possible
For testability, and to allow the exchange of debug information when
forwarding the LSP, it will be necessary to access debug information
stored in cache objects. This is cumbersome to do if our constructors
return source interfaces rather than concrete types.

This CL changes cache.New and (*Cache).NewSession to return concrete
types. This required removing NewSession from source.Cache. I would
argue that this makes sense from a philosophical perspective: everything
in the source package operates in a context where the Session and Cache
already exist.

Updates golang/go#34111

Change-Id: I01721db827d51117f9479f1544b15cedae0c5921
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220077
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-02-19 18:42:16 +00:00
..
lsprpc_test.go internal/jsonrpc2: support serving over unix domain sockets 2020-02-19 16:14:01 +00:00
lsprpc.go internal/lsp/cache: return concrete types where possible 2020-02-19 18:42:16 +00:00
telemetry.go internal/lsp: refactor LSP server instantiation 2020-02-06 23:12:37 +00:00