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

hyangah opened this issue Jan 16, 2019 · 2 comments


Copy link

@hyangah hyangah commented Jan 16, 2019

$ GO111MODULE=on GOPATH=$(mktemp -d) go list -json -m
go: finding latest
	"Path": "",
	"Version": "v4.0.0-20181227161524-e6919f6577db",
	"Time": "2018-12-27T16:15:24Z"
} 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
go list -m module "" 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
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019

This comment has been minimized.

Copy link

@bcmills bcmills commented Jul 31, 2019

At head this given a no matching versions error. Is that good enough?$ gotip mod init
go: creating new go.mod: module$ gotip version
go version devel +39d41787 Wed Jul 31 05:45:43 2019 +0000 linux/amd64$ gotip list -json -m
go: finding latest
go list -m no matching versions for query "latest"$ GOPROXY=direct gotip list -json -m
go: finding latest
go list -m no matching versions for query "latest"$

CC @jayconrod


This comment has been minimized.

Copy link

@gopherbot gopherbot commented Aug 31, 2019

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.