1
0
mirror of https://github.com/golang/go synced 2024-11-19 00:14:39 -07:00
go/internal/imports
Heschi Kreinick d0542c01b0 internal/imports: add all interfaces in mkstdlib
In api/*.txt, interface declarations are represented with lines like:
  pkg container/heap, type Interface interface { Len, Less, Pop, Push, Swap }
or, when they have no exported methods:
  pkg go/ast, type Expr interface, unexported methods

The latter form confuses mkstdlib into thinking that it's a method
because of the extra comma, and then it skips the interface entirely.
Running this program is a matter of seconds once per release, so rather
than trying to fix the optimization, just remove it. The parsing logic
doesn't care about the extra lines.

And the corresponding change to the copy in lsp/testdata/unimported.

Updates golang/go#34199

Change-Id: Ic34b8a47537608401e4ef6683617d797f9f50f8a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194568
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-09-10 20:25:02 +00:00
..
testdata/mod imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
fix_test.go internal/imports: get candidate imports 2019-08-16 16:26:37 +00:00
fix.go internal/imports: get candidate imports 2019-08-16 16:26:37 +00:00
imports_test.go all: skip more memory-intensive tests on linux-arm 2019-08-30 17:05:41 +00:00
imports.go internal/imports: get candidate imports 2019-08-16 16:26:37 +00:00
mkindex.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
mkstdlib.go internal/imports: add all interfaces in mkstdlib 2019-09-10 20:25:02 +00:00
mod_112_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
mod_cache_test.go internal/imports: skip scanned module cache dirs 2019-08-29 21:03:13 +00:00
mod_cache.go internal/imports: skip scanned module cache dirs 2019-08-29 21:03:13 +00:00
mod_test.go internal/imports: ignore invalid mod cache entries 2019-09-05 17:34:53 +00:00
mod.go internal/imports: ignore invalid mod cache entries 2019-09-05 17:34:53 +00:00
proxy_112_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
proxy_113_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
sortimports.go internal/imports: merge import declarations 2019-08-14 23:54:02 +00:00
zstdlib.go internal/imports: add all interfaces in mkstdlib 2019-09-10 20:25:02 +00:00