go/internal/lsp/cache
Heschi Kreinick 2b84a066b2 internal/lsp: use gocommand.Invocation more
We pass around verb/args/wd in many places. Bundle them up as an
Invocation instead. goCommandInvocation now updates and returns an input
Invocation.

packages.Config is conceptually an extra layer of parsing and
type-checking on top of a go list invocation. It doesn't make sense for
us to construct the latter using the former. A later CL will construct
the Config in terms of the Invocation; for now duplicate a bit of logic.

Use the environment in the cache key for various module operations
rather than the Config hash. I'm not sure either is fully correct but I
think the environment captures everything that's likely to matter. This
way we don't need Configs in those functions at all.

Change-Id: Iebee2705e63638ab365b3ee18b23f8c3e8ca30ce
Reviewed-on: https://go-review.googlesource.com/c/tools/+/265237
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-10-28 21:55:01 +00:00
..
analysis.go internal/memoize: switch from GC-driven to explicit deletion 2020-08-10 19:02:17 +00:00
cache.go internal/lsp/cache: populate URI on files with errors 2020-09-21 18:19:13 +00:00
check.go internal/lsp: use gocommand.Invocation more 2020-10-28 21:55:01 +00:00
error_test.go internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
errors.go internal/lsp: add support for RelatedInformation in diagnostics 2020-09-04 18:57:47 +00:00
imports.go all: use explicit -mod, -modfile fields for gocommand.Invocation 2020-10-19 17:57:15 +00:00
keys.go internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
load.go internal/lsp: do not allow non-Go files to be loaded in packages.load 2020-10-21 00:02:07 +00:00
mod.go internal/lsp: use gocommand.Invocation more 2020-10-28 21:55:01 +00:00
mod_tidy.go internal/lsp: use gocommand.Invocation more 2020-10-28 21:55:01 +00:00
os_darwin.go internal/lsp: add a mutex around the view's options 2020-04-02 16:41:49 +00:00
os_windows.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
parse.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
parse_test.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
pkg.go internal/lsp: prepare for deletion of view.modURI 2020-09-28 20:19:43 +00:00
session.go internal/gocommand: add a GoVersion function to avoid duplicating logic 2020-10-21 20:36:10 +00:00
snapshot.go internal/lsp: use gocommand.Invocation more 2020-10-28 21:55:01 +00:00
view.go internal/lsp: use gocommand.Invocation more 2020-10-28 21:55:01 +00:00
view_test.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00