Change information
Commit message:
go/packages: aggregate chunked files in Load
When packages.Load receives a long list of file arguments exceeding
safeArgMax, it splits them into chunks and processes each
separately. If the same package appears in multiple chunks, only the
files from the first chunk were kept, losing files from later chunks.
Fix by merging file lists when the same package appears in multiple
responses, deduplicating entries. Also add a fast path to skip
merging overhead when only one response exists.
Fixes golang/go#77226
Change-Id: I503a3405b9972cc992691c738f67602ca5aa4648
Files:
- M go/packages/golist.go
- M go/packages/packages.go
- M go/packages/packages_test.go
Change size: M
Delta: 3 files changed, 73 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +1 by Carlos Amedee, +2 by Alan Donovan
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI