1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:34:42 -07:00
go/internal/lsp/cache
Rebecca Stambler 383b97c0b5 internal/lsp: watch directories in replace targets and update on changes
This change adds the notion of a "workspace directory", which is
basically the set of directories that contains workspace packages. These
are mainly used for replace targets right now. It's a little trickier
than expected because the set of workspace directories can technically
change on any go.mod change.

At first, I wanted DidModifyFiles to report whether there was a change,
but I don't think it's actually that expensive to check on each call
and it complicates the code a bit. I can change it back if you think
it's worth doing.

The parse mod handle changes are because I needed an unlocked way of
parsing the mod file, but I imagine they'll conflict with CL 244769
anyway.

The next CL will be to "promote" replace targets to the level of
workspace packages, meaning we will be able to find references in them.

Change-Id: I5dd58fe29415473496ca6634a94a3134923228dc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/245327
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-08-07 23:35:17 +00:00
..
analysis.go internal/lsp: remove PackageHandle 2020-07-28 17:35:25 +00:00
cache.go internal/lsp: separate LSP files from FS files 2020-08-03 22:16:06 +00:00
check.go internal/lsp/cache: store parseGoHandles 2020-08-04 01:15:35 +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: replace ParseGoHandle with concrete data 2020-07-28 17:35:11 +00:00
keys.go internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
load.go internal/lsp: move builtin package to Snapshot 2020-08-03 22:09:14 +00:00
mod_tidy.go internal/lsp/cache: refactor go mod tidy error logic 2020-08-07 22:43:23 +00:00
mod.go internal/lsp: separate LSP files from FS files 2020-08-03 22:16:06 +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: store parseGoHandles 2020-08-04 01:15:35 +00:00
pkg.go internal/lsp: fix a few staticcheck suggestions, some cleanup 2020-07-29 17:11:59 +00:00
session.go internal/lsp: watch directories in replace targets and update on changes 2020-08-07 23:35:17 +00:00
snapshot.go internal/lsp: watch directories in replace targets and update on changes 2020-08-07 23:35:17 +00:00
view_test.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
view.go internal/lsp/cache: check for a gopackagesdriver binary 2020-08-07 18:25:03 +00:00