mirror of
https://github.com/golang/go
synced 2024-11-18 17:54:57 -07:00
e23f2f3ad7
go/packages overlay handling only really works for contains queries (file=), so our approach of reloading packages by package path (for workspace packages) wasn't handling newly created packages that need to be handled through overlays. Workaround this by reloading metadata for individual files that are missing it by running extra contains queries (only after the first metadata load for package paths). Be careful not to reload the same file multiple times if the first load did not succeed. Somewhat related, clear out `go list` errors in packages that go through overlay handling, since they will often be rendered irrelevant. I'm not sure if this is the right move, but if it's not, then we will have to do extra work to disregard those errors in gopls. Fixes golang/go#36661. Fixes golang/go#36635. Change-Id: Ib83cffcdf8a3e07da0f30e734d5e2c89691e1aba Reviewed-on: https://go-review.googlesource.com/c/tools/+/216141 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> |
||
---|---|---|
.. | ||
analysis.go | ||
cache.go | ||
check.go | ||
debug.go | ||
error_test.go | ||
errors.go | ||
external.go | ||
load.go | ||
mod_tidy.go | ||
overlay.go | ||
parse.go | ||
pkg.go | ||
session.go | ||
snapshot.go | ||
view.go |