Skip to content

cmd/go: missing 'go get' hint for 'go test' when go.sum entries are missing for transitive test dependencies #43572

@bcmills

Description

@bcmills

(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/[email protected]/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions