go/gopls/internal/regtest/workspace
Robert Findley e55fb40e67 internal/lsp/cache: clear shouldLoad IDs on load
CL 417576 externalized shouldLoad tracking into a map, which was used to
trigger a reload and cleared once reload completes. Unfortunately, it
overlooked the fact that we may also reload the entire workspace (via
reinitialization). In this case, we should clear newly loaded IDs from
the shouldLoad map, so that they are not subsequently loaded again.

Fixes golang/go#54473

Change-Id: I26f49552cae502644142dc4a4e946294db37f6f7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/424074
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-08-16 15:07:15 +00:00
..
broken_test.go internal/lsp/cache: validate the range for critical errors in go files 2022-08-11 13:46:09 +00:00
directoryfilters_test.go internal/lsp: use directoryFilters in import scanning 2022-08-04 15:50:11 +00:00
fromenv_test.go internal/lsp/cache: register a file watcher for explicit GOWORK values 2022-08-08 18:11:08 +00:00
metadata_test.go gopls/internal/regtest: add a test that ignoring a file resolves errors 2022-08-02 14:13:40 +00:00
workspace_test.go internal/lsp/cache: clear shouldLoad IDs on load 2022-08-16 15:07:15 +00:00