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 'go get' hint for 'go test' when go.sum entries are missing for transitive test dependencies #43572

Closed
bcmills opened this issue Jan 7, 2021 · 2 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 7, 2021

(Noticed via #43454.)

$ go version
go version devel +df81a1581 Thu Jan 7 01:55:27 2021 +0000 linux/amd64

$ go mod init example.com
go: creating new go.mod: module example.com

$ go get -d gonum.org/v1/gonum
go: downloading gonum.org/v1/gonum v0.8.2
go get: added gonum.org/v1/gonum v0.8.2

$ go test gonum.org/v1/gonum/graph/topo
# gonum.org/v1/gonum/graph/topo
.gopath/pkg/mod/gonum.org/v1/gonum@v0.8.2/graph/graphs/gen/batagelj_brandes.go:14:2: missing go.sum entry for module providing package golang.org/x/exp/rand
FAIL    gonum.org/v1/gonum/graph/topo [setup failed]
FAIL

For that last command, I think we should prompt the user to run go get -d gonum.org/v1/gonum/graph/topo or similar to download the transitive dependencies needed for the test.

CC @jayconrod @matloob

@bcmills
Copy link
Contributor Author

bcmills commented Jan 7, 2021

Marking as release-blocker for 1.16 because users are likely to run in to this more frequently due to #40728 (defaulting to -mod=readonly), and the solution to the error isn't obvious.

@bcmills bcmills added modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Jan 7, 2021
@bcmills bcmills added this to the Go1.16 milestone Jan 7, 2021
@jayconrod jayconrod self-assigned this Jan 8, 2021
@gopherbot
Copy link

Change https://golang.org/cl/282712 mentions this issue: cmd/go: add hints to more missing sum error messages

@golang golang locked and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants
@jayconrod @bcmills @gopherbot and others