]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modindex: fix obvious bug using failed type assertion
authorMichael Matloob <matloob@golang.org>
Tue, 30 Dec 2025 20:41:41 +0000 (15:41 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 30 Dec 2025 22:29:01 +0000 (14:29 -0800)
commitb28808d838682b2911698fcb934813b02f39fa69
treefef356c796782c7d2659231a16507da38d43582a
parentd64add4d60b69973e5cae62f07983f91435de58b
cmd/go/internal/modindex: fix obvious bug using failed type assertion

adonovan pointed out this bug in the review of CL 733320 and this seems
to be the cause of all those list_empty_importpath flakes. It makes
sense that something nondeterministic would be tied up with the module
index because the state of the cache could depend on the order tests are
run in.

Also remove the parts of the test that accept the flaky behavior so we
can verify the issue has been resolved.

For #73976

Change-Id: Ib64ce6b8eed1dc8d327b7c5e842c1e716a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/733321
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
src/cmd/go/internal/modindex/scan.go
src/cmd/go/testdata/script/list_empty_importpath.txt