[tools] go/packages: aggregate chunked files in Load

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Feb 12, 2026, 4:09:03 PM (14 hours ago) Feb 12
to Eliran Marom, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Alan Donovan, Carlos Amedee, Michael Matloob, golang-co...@googlegroups.com

Gopher Robot submitted the change

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
Auto-Submit: Alan Donovan <adon...@google.com>
Reviewed-by: Carlos Amedee <car...@golang.org>
Reviewed-by: Alan Donovan <adon...@google.com>
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:
  • requirement satisfiedCode-Review: +1 by Carlos Amedee, +2 by Alan Donovan
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I503a3405b9972cc992691c738f67602ca5aa4648
Gerrit-Change-Number: 736582
Gerrit-PatchSet: 6
Gerrit-Owner: Eliran Marom <eli...@gmail.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-CC: Michael Matloob <mat...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages