1
0
mirror of https://github.com/golang/go synced 2024-09-30 18:28:32 -06:00
go/internal/lsp/regtest
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
..
codelens_test.go internal/lsp: correctly marshal arguments for upgrade code lens 2020-07-27 21:52:59 +00:00
definition_test.go internal/lsp/regtest: put testing.T back in the test func signature 2020-04-14 18:42:46 +00:00
diagnostics_test.go internal/lsp: add parse errors as diagnostics even when parsing fails 2020-07-24 17:29:32 +00:00
doc.go internal/lsp/regtest: add expository package documentation 2020-04-28 21:10:48 +00:00
env_test.go internal/lsp: instrument work done reporting to use in regtests 2020-04-28 20:46:32 +00:00
env.go internal/lsp: watch directories in replace targets and update on changes 2020-08-07 23:35:17 +00:00
fix_test.go internal/lsp: move fillstruct suggested fixes out of analysis 2020-07-20 20:42:44 +00:00
formatting_test.go gopls, internal/lsp: support an extra formatting hook for gofumpt 2020-07-13 21:42:47 +00:00
generate_test.go internal/lsp/regtest: add support for testing generate commands 2020-05-04 19:25:30 +00:00
imports_test.go internal/lsp/regtest: add run options to support stress testing 2020-07-23 23:37:37 +00:00
link_test.go internal/lsp/regtest: add run options to support stress testing 2020-07-23 23:37:37 +00:00
modfile_test.go internal/lsp: add errors for missing modules that don't map to an import 2020-07-24 00:18:24 +00:00
reg_test.go internal/lsp/regtest: simpler way to invert options 2020-07-16 18:20:50 +00:00
runner.go internal/lsp/regtest: fix WithoutWorkspaceFolders option 2020-07-23 23:38:05 +00:00
shared_test.go internal/lsp/regtest: add run options to support stress testing 2020-07-23 23:37:37 +00:00
stress_test.go internal/lsp/regtest: add a simple stress test 2020-07-23 23:37:47 +00:00
symbol_helper_test.go internal/lsp/fake: define Symbol method on Editor 2020-05-11 20:27:07 +00:00
symbol_test.go internal/lsp/source: add a new symbolStyle configuration option 2020-06-26 17:13:37 +00:00
unix_test.go internal/lsp: lift env out of the sandbox into the editor 2020-07-23 21:58:45 +00:00
vendor_test.go internal/lsp/regtest: add run options to support stress testing 2020-07-23 23:37:37 +00:00
watch_test.go internal/lsp: invalidate all packages on go.mod file changes 2020-07-31 06:09:45 +00:00
workspace_test.go internal/lsp: watch directories in replace targets and update on changes 2020-08-07 23:35:17 +00:00
wrappers.go internal/lsp: correctly invalidate metadata for batched changes 2020-07-27 19:55:46 +00:00