go/internal
Robert Findley 627cb6d672 internal/lsp/source: simplify workspace symbol package collection
While evaluating workspace symbols, we avoid duplicate packages per
package path in an effort to save computing time and eliminate duplicate
results. But for simplicity, we later guard to ensure that we don't ever
walk files twice.

We can just rely on this guard to prevent duplication, and walk all
known packages. This ensures we don't miss symbols, at minimal
additional cost, and simplies the code.

This is a roll-forward of CL 272686, which was accidentally submitted
too early.

Fixes golang/go#42791

Change-Id: I8c39b7afe6c38fedb0e21831d88c28d13d51f102
Reviewed-on: https://go-review.googlesource.com/c/tools/+/274243
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
2020-12-07 18:57:54 +00:00
..
analysisinternal internal/lsp/fuzzy: fix return value on no match 2020-08-28 15:37:48 +00:00
apidiff
event internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
fakenet internal/fakenet: add a fake network connection 2020-05-27 14:27:59 +00:00
fastwalk
gocommand internal/gocommand: improve debug string 2020-11-16 17:23:50 +00:00
gopathwalk internal/imports: fix crash when adding stdlib imports 2020-08-13 17:47:04 +00:00
imports internal/imports: handle out of range panic in modInfo 2020-11-03 18:34:43 +00:00
jsonrpc2 internal/lsp: support go1.12 2020-07-20 15:02:56 +00:00
lsp internal/lsp/source: simplify workspace symbol package collection 2020-12-07 18:57:54 +00:00
memoize internal/memoize: add a final argument to Bind for cleaning up 2020-10-30 19:59:21 +00:00
packagesinternal all: use explicit -mod, -modfile fields for gocommand.Invocation 2020-10-19 17:57:15 +00:00
proxydir all: remove version-specific test files 2020-05-28 17:13:50 +00:00
span internal/typesinternal: use Go 1.16 metadata for go/types errors 2020-12-07 17:42:14 +00:00
stack internal/stack: add the leak test 2020-05-27 14:25:42 +00:00
testenv internal/testenv: add a NeedsGoBuild function 2020-06-10 16:09:22 +00:00
tool
typesinternal internal/typesinternal: use Go 1.16 metadata for go/types errors 2020-12-07 17:42:14 +00:00
xcontext