Skip to content
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 [1.19 backport] #60000

Closed
gopherbot opened this issue May 5, 2023 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases GoCommand cmd/go
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #56222 to be considered for backport to the next 1.19 minor release.

@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.

@gopherbot
Copy link
Author

Change https://go.dev/cl/492983 mentions this issue: [release-branch.go1.19] cmd/go: save checksums for go.mod files needed for go version lines

@dmitshur dmitshur added the GoCommand cmd/go label May 5, 2023
@thanm
Copy link
Contributor

thanm commented May 5, 2023

The 60,000th github issue for Go-- hah! Looks like gopherbot gets to claim the prize.

@bcmills bcmills added the CherryPickApproved Used during the release process for point releases label May 11, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label May 11, 2023
@bcmills bcmills changed the title cmd/go: unexpected tidy behavior: missing sum for dependency of test of dependency [1.19 backport] cmd/go: missing checksums for dependencies of go get arguments and tests of external dependencies [1.19 backport] May 12, 2023
@bcmills bcmills changed the title cmd/go: missing checksums for dependencies of go get arguments and tests of external dependencies [1.19 backport] cmd/go: missing checksums for dependencies of go get arguments and tests of external dependencies [1.19 backport] May 12, 2023
@dmitshur dmitshur changed the title cmd/go: missing checksums for dependencies of go get arguments and tests of external dependencies [1.19 backport] cmd/go: missing checksums for dependencies of go get arguments and tests of external dependencies [1.19 backport] May 12, 2023
gopherbot pushed a commit that referenced this issue May 30, 2023
…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>
@gopherbot
Copy link
Author

Closed by merging 29f3469 to release-branch.go1.19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases GoCommand cmd/go
Projects
None yet
Development

No branches or pull requests

4 participants