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

Closed
hyangah opened this issue Jan 16, 2019 · 2 comments

Comments

@hyangah
Copy link
Contributor

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

@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

At head this given a no matching versions error. Is that good enough?

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

example.com$ gotip version
go version devel +39d41787 Wed Jul 31 05:45:43 2019 +0000 linux/amd64

example.com$ gotip list -json -m golang.org/x/text/v4@latest
go: finding golang.org/x/text/v4 latest
go list -m golang.org/x/text/v4: no matching versions for query "latest"

example.com$ GOPROXY=direct gotip list -json -m golang.org/x/text/v4@latest
go: finding golang.org/x/text/v4 latest
go list -m golang.org/x/text/v4: no matching versions for query "latest"

example.com$

CC @jayconrod

@gopherbot

This comment has been minimized.

Copy link

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
Projects
None yet
4 participants
You can’t perform that action at this time.