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
The source test is one of three (partial) implementations
of the tests.Tests interface, which defines the behavior
of the marker tests. It makes direct calls to logic in
the source package; the other two implementations make
LSP RPCs (lsp_test) or fork+exec the gopls command (cmd_test).
I have audited all the functions in source_test and
satisfied myself that they provide no additional coverage
beyond what is provided by lsp_test, and in some cases
strictly less. A lot of logic was redundant.
Ultimately, lsp_test is what matters, since the LSP is our
main interface. Where there was any subtlety or discrepancy,
I have remarked below.
A few functions in source have been made unexported.
This also removes 9s real, 18s CPU, from our CI builds.
Details:
- CompletionSnippet
source_test had opts.Matcher = source.Fuzzy
- DeepCompletion
source_test had a FuzzyMatcher, but it never affected the outcome.
- RankCompletion
source_test failed to set these options used in the LSP test:
opts.CompleteUnimported = false
opts.LiteralCompletions = true
- Import
lsp_test invokes the broader textDocument/codeAction RPC
where source_test called AllImportsFixes.
- Definition
source_test was calling FormatHover twice!
- Rename
the LSP implementation does strictly more (reports the
file rename).
Updates golang/go#54845
Change-Id: I1b0956d56540856dc0494f50ede0be7b7acc3e8e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/462816
Run-TryBot: Alan Donovan <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
0 commit comments