go/internal/lsp
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 gopls: fix various staticcheck errors 2020-09-29 17:30:36 +00:00
browser internal/lsp: add version and bug commands 2019-05-11 04:16:02 +00:00
cache internal/lsp/cache: keep a cached workspace module dir 2020-10-30 20:42:49 +00:00
cmd internal/lsp: update lsp protocol stubs to match LSP 3.16 revisions 2020-10-27 18:00:23 +00:00
debug internal/lsp: print the go version only once the view is created 2020-09-30 16:38:20 +00:00
diff internal/testenv: check that external 'diff' tool is the GNU version 2020-05-08 20:46:49 +00:00
fake internal/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00
fuzzy internal/lsp/fuzzy: fix return value on no match 2020-08-28 15:37:48 +00:00
helper internal/lsp: update lsp protocol stubs to match LSP 3.16 revisions 2020-10-27 18:00:23 +00:00
lsprpc internal/lsp/lsprpc: make the LSP forwarder exit error clearer 2020-09-01 17:31:45 +00:00
mod internal/lsp/source: add a FileSource interface 2020-10-19 16:07:06 +00:00
protocol internal/lsp/protocol/typescript: code for latest 3.16 LSP 2020-10-28 11:10:35 +00:00
snippet all: fix broken links to LSP specification 2019-10-02 18:32:53 +00:00
source internal/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00
testdata internal/lsp: add gopls semtok command and semantic token tests 2020-10-16 18:10:36 +00:00
tests internal/lsp: add gopls semtok command and semantic token tests 2020-10-16 18:10:36 +00:00
call_hierarchy.go internal/lsp: release resources for call hierarchy file requests 2020-08-07 21:04:51 +00:00
code_action.go internal/lsp: use the go command to fix go.mod files 2020-10-28 22:47:54 +00:00
code_lens.go internal/lsp: return code lenses in a deterministic order 2020-10-21 17:08:55 +00:00
command.go internal/lsp/cache: introduce a workspace abstraction 2020-10-30 19:58:30 +00:00
completion.go internal/lsp/source: refactor c.item to support deepSearch in all cases 2020-10-01 23:00:09 +00:00
completion_test.go internal/lsp: pass options by reference instead of by value 2020-09-16 22:53:23 +00:00
debounce.go internal/lsp: add experimental support for multi-phase diagnostics 2020-10-02 14:12:12 +00:00
debounce_test.go internal/lsp: delay longer in TestDebouncer 2020-10-30 20:03:00 +00:00
definition.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
diagnostics.go internal/lsp: correct typo 2020-10-28 17:12:10 +00:00
folding_range.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
format.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
general.go internal/lsp/semantic.go: remove global variable 2020-10-22 21:19:33 +00:00
highlight.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
hover.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
implementation.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
link.go internal/lsp: move package selection to before type checking 2020-09-24 22:42:22 +00:00
lsp_test.go internal/lsp/semantic.go: remove global variable 2020-10-22 21:19:33 +00:00
progress.go internal/lsp/source: synchronous commands the default 2020-10-28 18:20:00 +00:00
progress_test.go internal/lsp: improvements for command messages 2020-08-21 20:07:30 +00:00
references.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
rename.go internal/lsp/source: add a FileSource interface 2020-10-19 16:07:06 +00:00
reset_golden.sh internal/lsp: fix regeneration of golden files 2019-09-25 13:16:59 +00:00
semantic.go internal/lsp/semantic.go: remove global variable 2020-10-22 21:19:33 +00:00
server.go internal/lsp: correct typo 2020-10-28 17:12:10 +00:00
server_gen.go internal/lsp: update lsp protocol stubs to match LSP 3.16 revisions 2020-10-27 18:00:23 +00:00
signature_help.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
symbols.go internal/lsp/cache: ref-count snapshots 2020-08-03 22:08:54 +00:00
text_synchronization.go internal/lsp: improve handling of files not in views 2020-10-06 18:39:45 +00:00
workspace.go internal/lsp: use the correct method name to register semantic tokens 2020-10-30 14:18:16 +00:00
workspace_symbol.go internal/lsp/source: add a new symbolStyle configuration option 2020-06-26 17:13:37 +00:00