]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add hints to more missing sum error messages
authorJay Conrod <jayconrod@google.com>
Fri, 8 Jan 2021 20:14:22 +0000 (15:14 -0500)
committerJay Conrod <jayconrod@google.com>
Wed, 13 Jan 2021 23:37:31 +0000 (23:37 +0000)
commit7eb31d999cf2769deb0e7bdcafc30e18f52ceb48
tree52252dc4017939c3df379be8e8308b0f90378857
parentba76567bc2500204432ed8a5cb28848410e74447
cmd/go: add hints to more missing sum error messages

When a command fails due to a module zip sum missing from go.sum,
if the module is in the build list, the go command will print a
'go mod download' command the user can run to fix it.

Previously, a hint was only printed if the module provided a package
in 'all'. We don't print a 'go get' hint, since we may not want to add
a new requirement to go.mod.

Fixes #43572

Change-Id: I88c61b1b42ad56c04e4482f6a1bb97ce758aaeff
Reviewed-on: https://go-review.googlesource.com/c/go/+/282712
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modload/import.go
src/cmd/go/internal/modload/load.go
src/cmd/go/testdata/script/mod_sum_ambiguous.txt
src/cmd/go/testdata/script/mod_sum_readonly.txt