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.20 backport] #60001

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

Comments

@gopherbot
Copy link
Contributor

@bcmills requested issue #56222 to be considered for backport to the next 1.20 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
Contributor Author

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

@dmitshur dmitshur added the GoCommand cmd/go label May 5, 2023
@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.20 backport] cmd/go: missing checksums for dependencies of go get arguments and tests of external dependencies [1.20 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.20 backport] cmd/go: missing checksums for dependencies of go get arguments and tests of external dependencies [1.20 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 #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>
@gopherbot
Copy link
Contributor Author

Closed by merging 4b95fc1 to release-branch.go1.20.

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

No branches or pull requests

3 participants