go/internal/lsp/cache
Rob Findley 4fc0492b8e internal/lsp/cache: keep a cached workspace module dir
Keep a workspace module dir around for running the go command against a
snapshot, bound to the contents of the workspace modfile.

This uses the cache's resource model to share the workspace module dir
across snapshots if it is not invalidated, and to delete it when it is
no longer in-use by a snapshot. Of course, the go command will still
only see files on the filesystem, but using this immutable model was
most consistent with the immutable workspace.

For golang/go#41836

Change-Id: Iaec544283b2f545071e5cab1d0ff2a66e6d24dff
Reviewed-on: https://go-review.googlesource.com/c/tools/+/263938
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Robert Findley <rfindley@google.com>
2020-10-30 20:42:49 +00:00
..
analysis.go internal/memoize: add a final argument to Bind for cleaning up 2020-10-30 19:59:21 +00:00
cache.go internal/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00
check.go internal/memoize: add a final argument to Bind for cleaning up 2020-10-30 19:59:21 +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 internal/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00
keys.go internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
load.go internal/lsp/cache: keep a cached workspace module dir 2020-10-30 20:42:49 +00:00
mod.go internal/memoize: add a final argument to Bind for cleaning up 2020-10-30 19:59:21 +00:00
mod_tidy.go internal/memoize: add a final argument to Bind for cleaning up 2020-10-30 19:59:21 +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/memoize: add a final argument to Bind for cleaning up 2020-10-30 19:59:21 +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/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00
snapshot.go internal/lsp/cache: keep a cached workspace module dir 2020-10-30 20:42:49 +00:00
view.go internal/lsp/cache: consider gopls.mod when finding workspace root 2020-10-30 19:58:41 +00:00
view_test.go internal/lsp/cache: consider gopls.mod when finding workspace root 2020-10-30 19:58:41 +00:00
workspace.go internal/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00
workspace_test.go internal/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00