You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gopls/internal/lsp/source: find references in test packages
When finding references or implementations, we must include objects
defined in intermediate test variants. However, as we have seen we
should be careful to avoid accidentally type-checking intermediate test
variants in ParseFull, which is not their workspace parse mode.
Therefore eliminate the problematic TypecheckAll type-check mode in
favor of special handling in this one case where it is necessary.
Along the way:
- Simplify the mapping of protocol position->offset. This should not
require getting a package, or even parsing a file. For isolation,
just use the NewColumnMapper constructor, even though it may
technically result in building a token.File multiple times.
- Update package renaming logic to use TypecheckWorkspace, since we
only need to rename within the workspace.
- Add regtest support for Implementations requests.
Fixesgolang/go#43144
Change-Id: I41f684ad766f5af805abbd7c5ee0a010ff9b9b8c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/438755
gopls-CI: kokoro <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
0 commit comments