1
0
mirror of https://github.com/golang/go synced 2024-11-18 23:34:45 -07:00
go/internal/lsp/mod
Michael Matloob 84cebe1034 go/packages: fix incorrect needtypes and needsrcs logic
This logic is really fiddly and I'm not really 100% sure it's right, though
I've thought about it for quite abit (and added comments to help me reason
through it).

Also always request CompiledGoFiles when NeedTypes is true because we might
need to fall back to loading from source when type data is incorrect.

Fixes golang/go#36441
Fixes golang/go#36547

Change-Id: I1cc27ca2e4401a9abc8502990b0da7d0480f6f84
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214943
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-01-16 22:59:55 +00:00
..
testdata go/packages: fix incorrect needtypes and needsrcs logic 2020-01-16 22:59:55 +00:00
diagnostics.go internal/lsp: show dependency quick fixes for go.mod diagnostics 2020-01-15 16:51:05 +00:00
mod_test.go internal/lsp/cache: refactor initialization for builtins 2020-01-15 21:04:26 +00:00