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
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@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
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. 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
Copy link
Contributor

bcmills 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

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jul 31, 2019
@gopherbot
Copy link

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.)

@golang golang locked and limited conversation to collaborators Aug 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants