go/internal/lsp/cmd
Robert Findley f157068c1b internal/lsp/regtest: allow sharing memoized results across regtests
Each regtest does a significant amount of extra work re-doing things
like parsing and type-checking the runtime package. We can share this
work across regtests by using a shared cache, significantly speeding
them up at the cost of potentially hiding bugs related to timing.

Sharing this work still retains most of the benefit of the regtests, so
implement this in the default mode (formerly called "singleton" and now
renamed to "default"). In a subsequent CL, modes will be cleaned up so
that "default" is the only mode that runs with -short.

Making this change actually revealed a caching bug: our cached package
stores error messages extracted from go/packages errors, but does not
include these errors in the cache key. Fix this by hashing all metadata
errors into the package cache key.

Updates golang/go#39384

Change-Id: I37ab9604149d34c9a79fc02b0e1bc23fcb17c454
Reviewed-on: https://go-review.googlesource.com/c/tools/+/417587
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-07-26 21:20:42 +00:00
..
test internal/lsp/regtest: allow sharing memoized results across regtests 2022-07-26 21:20:42 +00:00
usage internal/lsp/cmd: add -config option to gopls vulncheck 2022-05-12 21:16:26 +00:00
call_hierarchy.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
capabilities_test.go internal/lsp/regtest: allow sharing memoized results across regtests 2022-07-26 21:20:42 +00:00
check.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
cmd.go internal/lsp/regtest: allow sharing memoized results across regtests 2022-07-26 21:20:42 +00:00
cmd_test.go internal/lsp: add missing bug reporting, and panic during marker tests 2022-05-31 14:14:38 +00:00
definition.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
export_test.go internal/lsp: refactor query definition test to allow adding a new test 2019-03-18 20:06:54 +00:00
folding_range.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
format.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
help_test.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
highlight.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
implementation.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
imports.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
info.go internal/tool: implement structured help command 2022-05-04 22:58:41 +00:00
links.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
prepare_rename.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
references.go gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
remote.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
rename.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
semantictokens.go internal/lsp: factor out column mapper construction from content 2022-06-01 19:19:49 +00:00
serve.go internal/lsp/regtest: allow sharing memoized results across regtests 2022-07-26 21:20:42 +00:00
signature.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
subcommands.go internal/tool: implement structured help command 2022-05-04 22:58:41 +00:00
suggested_fix.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
symbols.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
vulncheck.go internal/lsp/cmd: add -config option to gopls vulncheck 2022-05-12 21:16:26 +00:00
workspace.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
workspace_symbol.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00