1
0
mirror of https://github.com/golang/go synced 2024-11-18 22:44:48 -07:00
go/internal/lsp/testdata
Heschi Kreinick eb46839a96 internal/imports: return non-stdlib candidates from GetAllCandidates
Scan most sources, including GOPATH, the module cache, the main module,
and replace targets as appropriate. Use the cached stdlib instead of
scanning GOROOT.

We heavily cache the contents of the module cache, so performance is
decent. But we have to look at all the modules not in the module cache
too to get the right versions of modules (see
(*ModuleResolver).canonicalize), which currently isn't cached at all,
even just for a single run. That ends up being pretty expensive.

The implementation changes are relatively small; add package name
loading to scan(), cache that result, and allow callers to control what
directories are scanned so that it can skip GOROOT.

I also cleared out most of the stdlib from the unimported completion
test and added a simple external completion to it for safety's sake.

Change-Id: Id50fd4703b1126be35a000fe90719e19c3ab84bf
Reviewed-on: https://go-review.googlesource.com/c/tools/+/199178
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-10-21 20:45:15 +00:00
..
analyzer
anon
arraytype internal/lsp: fix bad *ast.ArrayTypes for completion 2019-10-17 20:53:01 +00:00
bad internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
badstmt internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
bar
basiclit
baz
builtins internal/lsp: omit "iota" completion outside const decls 2019-09-15 20:16:06 +00:00
casesensitive internal/lsp: provide option for case sensitive completion 2019-09-26 16:59:42 +00:00
cast
channel
comments
complit
constant
deep internal/lsp: search for deep completions across function calls 2019-10-17 03:50:25 +00:00
errors
fieldlist internal/lsp: improve completions in *ast.FieldList 2019-09-25 22:58:16 +00:00
folding internal/lsp: fix regeneration of golden files 2019-09-25 13:16:59 +00:00
foo internal/lsp: fix bad *ast.ArrayTypes for completion 2019-10-17 20:53:01 +00:00
format internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
func_rank
funcsig internal/lsp: fix scope of FuncType completion candidates 2019-09-25 19:53:33 +00:00
funcvalue
fuzzy internal/lsp: reorganize completion tests 2019-09-24 17:09:08 +00:00
generated internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
godef internal/lsp: add constant values to hovers 2019-09-28 23:04:22 +00:00
good internal/lsp: remove duplicated enums 2019-09-25 15:30:23 +00:00
highlights
importedcomplit
imports internal/lsp: fix regeneration of golden files 2019-09-25 13:16:59 +00:00
index
interfacerank
labels internal/lsp: add label completion candidates 2019-10-16 23:06:01 +00:00
links
nested_complit internal/lsp: add literal completion candidates 2019-09-18 17:13:17 +00:00
nodisk
noparse internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
noparse_format internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
rank
references
rename internal/lsp: change the unified diff tests to be less fragile 2019-09-27 19:13:25 +00:00
selector
signature
snippets internal/lsp: don't qualify literal candidates in *ast.SelectorExpr 2019-10-16 23:29:27 +00:00
suggestedfix
symbols
testy internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
typeassert
types
unimported internal/imports: return non-stdlib candidates from GetAllCandidates 2019-10-21 20:45:15 +00:00
unresolved
unsafe
summary.txt.golden internal/lsp: fix bad *ast.ArrayTypes for completion 2019-10-17 20:53:01 +00:00