]> Cypherpunks repositories - gostls13.git/commit
cmd/go: omit checksums for go.mod files needed for go version lines more often in...
authorBryan C. Mills <bcmills@google.com>
Thu, 8 Jun 2023 21:55:55 +0000 (17:55 -0400)
committerBryan Mills <bcmills@google.com>
Mon, 12 Jun 2023 13:58:58 +0000 (13:58 +0000)
commit1db23771afc7b9b259e926db35602ecf5047ae23
tree6d8f27816e2de1d924ce3b84c0a914ce855d8fc9
parentee46f0b5084461978432aa20df003ac52500b0f0
cmd/go: omit checksums for go.mod files needed 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 #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>
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/mod_sum_issue56222.txt