-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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: in go 1.21 module, go mod tidy and 'go list -m -u all' disagree over which go.sum lines are needed #61605
Comments
Here's a test case version. I have not managed to whittle it down but I think I see a way to make it stop breaking (not the right way, but a way).
|
Change https://go.dev/cl/513778 mentions this issue: |
After CL 513778 is submitted to the Go 1.21 release branch, we can move this to the Go 1.22 milestone. |
This is a band-aid of a fix for Go 1.21, to create space to work on a real fix for Go 1.22, if in fact the real fix is different. It simply disables the go.sum update check during go list -m -u. I don't have a self-contained test for the breakage. See #61605. All existing tests continue to pass. For #61605. After merging into the Go 1.21 branch we can move #61605 to the Go 1.22 milestone. Change-Id: Ib155710092003f08d2a6ce0aefa8e0270cad5a5c Reviewed-on: https://go-review.googlesource.com/c/go/+/513778 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Change https://go.dev/cl/514899 mentions this issue: |
Submitted the band-aid to the Go 1.21 release branch. Now a Go 1.22 bug. |
…bout missing checksums This is a band-aid of a fix for Go 1.21, to create space to work on a real fix for Go 1.22, if in fact the real fix is different. It simply disables the go.sum update check during go list -m -u. I don't have a self-contained test for the breakage. See #61605. All existing tests continue to pass. For #61605. After merging into the Go 1.21 branch we can move #61605 to the Go 1.22 milestone. Change-Id: Ib155710092003f08d2a6ce0aefa8e0270cad5a5c Reviewed-on: https://go-review.googlesource.com/c/go/+/514899 Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
…bout missing checksums This is a band-aid of a fix for Go 1.21, to create space to work on a real fix for Go 1.22, if in fact the real fix is different. It simply disables the go.sum update check during go list -m -u. I don't have a self-contained test for the breakage. See golang#61605. All existing tests continue to pass. For golang#61605. After merging into the Go 1.21 branch we can move golang#61605 to the Go 1.22 milestone. Change-Id: Ib155710092003f08d2a6ce0aefa8e0270cad5a5c Reviewed-on: https://go-review.googlesource.com/c/go/+/514899 Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
I think a proper fix is in the general direction of #40775. The set of checksums to retain should be associated with the |
@matloob, @samthanawalla: this is a code cleanup needed in |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No(-ish).
I first ran into this in a module whose 'go' line is 1.21, so the latest release today (1.20.6) isn't applicable.
If I change the 'go' line to 1.20, then 'go mod tidy' no longer deletes as many go.sum lines, and the issue doesn't reproduce.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran
go mod tidy
in a medium sized local module whose go.mod has 'go 1.21' (primarily to help test this language version and its semantics, not because I need it; this go.mod file isn't public).Then I ran
go list -m -u all
.Edit: It turned out trivial to trigger the issue with a very minified top-level go.mod file. Here's a complete reproducer:
What did you expect to see?
The usual list of modules and available updates, and exit code 0.
What did you see instead?
Running the go list command with -mod=mod re-adds the go.sum lines and makes the command work.
Or setting go to 1.20 instead of 1.21 and re-running go mod tidy also works around the issue.
The text was updated successfully, but these errors were encountered: