-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: missing checksums for dependencies of go get
arguments and tests of external dependencies
#56222
Comments
Change https://go.dev/cl/489075 mentions this issue: |
@gopherbot, please backport to Go 1.19 and 1.20. We should at least report a clear error for missing checksums instead of trying to build with the wrong language version. |
Backport issue(s) opened: #60000 (for 1.19), #60001 (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. |
Change https://go.dev/cl/493015 mentions this issue: |
Change https://go.dev/cl/492983 mentions this issue: |
Change https://go.dev/cl/492741 mentions this issue: |
… mod tidy' of modules before 'go 1.21' This eliminate a network access in 'go mod tidy' of an already-tidy module, which would otherwise be needed to fetch go.mod checksums for the test dependencies whose go.mod checksums were omitted in Go releases between Go 1.17 and 1.20 due to bug #56222. For modules between 'go 1.17' and 'go 1.20' we intentionally preserve the old 'go mod tidy' output (omitting go.sum entries for the go.mod files of test dependencies of external packages). We should also avoid performing extra sumdb lookups for checksums that would be discarded anyway. Updates #56222. Change-Id: I7f0f1c8e902db0e3414c819621c4b99052f503f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/492741 Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
go get
arguments and tests of external dependencies
…d for go version lines When we load a package from a module, we need the go version line from that module's go.mod file to know what language semantics to use for the package. We need to save a checksum for the go.mod file even if the module's requirements are pruned out of the module graph. Previously, we were missing checksums for test dependencies of packages in 'all' and packages passed to 'go get -t'. This change preserves the existing bug for 'go mod tidy', but fixes it for 'go get -t' and flags the missing checksum with a clearer error in other cases. Fixes #60001. Updates #56222. Change-Id: Icd6acce348907621ae0b02dbeac04fb180353dcf (cherry picked from CL 489075 and CL 492741) Reviewed-on: https://go-review.googlesource.com/c/go/+/493015 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 When we load a package from a module, we need the go version line from that module's go.mod file to know what language semantics to use for the package. We need to save a checksum for the go.mod file even if the module's requirements are pruned out of the module graph. Previously, we were missing checksums for test dependencies of packages in 'all' and packages passed to 'go get -t'. This change preserves the existing bug for 'go mod tidy', but fixes it for 'go get -t' and flags the missing checksum with a clearer error in other cases. Fixes #60000. Updates #56222. Change-Id: Icd6acce348907621ae0b02dbeac04fb180353dcf (cherry picked from CL 489075 and CL 492741) Reviewed-on: https://go-review.googlesource.com/c/go/+/492983 Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Bypass: Bryan Mills <bcmills@google.com>
Change https://go.dev/cl/502015 mentions this issue: |
Change https://go.dev/cl/502016 mentions this issue: |
Change https://go.dev/cl/502017 mentions this issue: |
…ore 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 #60667. Updates #56222. Change-Id: Ied6ed3e80a62f9cd9a328b43a415a42d14481056 Reviewed-on: https://go-review.googlesource.com/c/go/+/502015 Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
…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>
cc @bcmills
The following cmd/go script test unexpectedly passes:
What did you expect to see?
The expected behavior is that we have all the sums we need to test a dependency package (
example.com/m2/q
).What did you see instead?
There's a sum missing error.
The text was updated successfully, but these errors were encountered: