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: `go list -m <name>/vN@latest` doesn't error when the vN version doesn't exist #29762

Open
hyangah opened this Issue Jan 16, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@hyangah
Copy link
Contributor

hyangah commented Jan 16, 2019

$ GO111MODULE=on GOPATH=$(mktemp -d) go list -json -m golang.org/x/text/v4@latest
go: finding golang.org/x/text/v4 latest
{
	"Path": "golang.org/x/text/v4",
	"Version": "v4.0.0-20181227161524-e6919f6577db",
	"Time": "2018-12-27T16:15:24Z"
}

golang.org/x/text/v4 does not exist yet, but go list makes up a pseudo-version based on the latest commit in the repo without an error.

Without the @latest suffix, go list reports an error, but not because the module is invalid.

$ GOPATH=$(mktemp -d) go list -json -m golang.org/x/text/v4
go list -m golang.org/x/text/v4: module "golang.org/x/text/v4" is not a known dependency
$ go version
go version devel +5fae09b738 Tue Jan 15 23:30:58 2019 +0000 darwin/amd64

@hyangah hyangah added the modules label Jan 16, 2019

@bcmills bcmills added the NeedsFix label Jan 17, 2019

@bcmills bcmills added this to the Go1.13 milestone Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment