-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go list fails with submodules which have test-only dependencies #60667
Comments
Looking more into it, it might be related to |
I believe |
@Nasfame I can't reproduce it, Basically the bug is that |
Duplicate of #56222 |
I'm not sure why it's a duplicate, the problem comes only with #56222 fix backported to Go 1.20 in Go 1.20.5. It worked fine before that. |
Ah, I had missed that detail. Yes, it seems that the backported fix needs an extra condition for when to save the checksums. |
I see this is marked for 1.21, when this is resolved will this be backported to 1.20.6? This is breaking a lot of our tooling and we won't be able to update to 1.21+ for the foreseeable future giving that go is dropping support for a lot of operating system versions. |
Change https://go.dev/cl/502015 mentions this issue: |
@gopherbot, please backport to Go 1.19 and 1.20. This is a regression introduced in a previous patch release. |
Backport issue(s) opened: #60697 (for 1.19), #60698 (for 1.20). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
In the meantime you can work around this with one of the following:
|
Change https://go.dev/cl/502016 mentions this issue: |
Change https://go.dev/cl/502017 mentions this issue: |
…d for go version lines more often in pre-1.21 modules This updates the logic from CL 489075 to avoid trying to save extra sums if they aren't already expected to be present and cfg.BuildMod != "mod" (as in the case of "go list -m -u all" with a go.mod file that specifies go < 1.21). Fixes #60698. Updates #60667. Updates #56222. Change-Id: Ied6ed3e80a62f9cd9a328b43a415a42d14481056 Reviewed-on: https://go-review.googlesource.com/c/go/+/502016 Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com>
…d for go version lines more often in pre-1.21 modules This updates the logic from CL 489075 to avoid trying to save extra sums if they aren't already expected to be present and cfg.BuildMod != "mod" (as in the case of "go list -m -u all" with a go.mod file that specifies go < 1.21). Fixes #60697. Updates #60667. Updates #56222. Change-Id: Ied6ed3e80a62f9cd9a328b43a415a42d14481056 Reviewed-on: https://go-review.googlesource.com/c/go/+/502017 Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Bypass: Bryan Mills <bcmills@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes, I believe it is related to #60001
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I hit this on a big repository, but I reduced this down to https://github.com/smira/go-test-package-failure.
There's a submodule which has an import of a package from
_test.go
file.What did you expect to see?
Switching to older version of Go "fixes" it:
What did you see instead?
In the checkout, the following fails:
$ ~/go/bin/go1.20.5 list -u -m -json all go: updates to go.sum needed, disabled by -mod=readonly
The text was updated successfully, but these errors were encountered: