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: misleading error from 'go list -versions' when GOPROXY is invalid #32335

Closed
bcmills opened this issue May 30, 2019 · 1 comment
Closed
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 30, 2019

Observed:

example.com$ gotip version
go version devel +220552f6 Thu May 30 17:59:57 2019 +0000 linux/amd64

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

example.com$ GOPROXY='' gotip list -versions -m rsc.io/quote
go: finding rsc.io/quote v1.5.2
rsc.io/quote v1.0.0 v1.1.0 v1.2.0 v1.2.1 v1.3.0 v1.4.0 v1.5.0 v1.5.1 v1.5.2 v1.5.3-pre1

example.com$ GOPROXY='bogus-path' gotip list -versions -m rsc.io/quote
go list -m rsc.io/quote: module "rsc.io/quote" is not a known dependency

example.com$ GOPROXY='bogus-path' gotip get rsc.io/quote@latest
go get rsc.io/quote@latest: invalid proxy URL missing scheme: bogus-path

example.com$

Expected:

An error message from list similar to the one from get:

example.com$ GOPROXY='bogus-path' gotip list -versions -m rsc.io/quote
go list -m rsc.io/quote: invalid proxy URL missing scheme: bogus-path

CC @jayconrod @hyangah

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. modules labels May 30, 2019
@bcmills bcmills added this to the Go1.13 milestone May 30, 2019
@gopherbot
Copy link

Change https://golang.org/cl/181018 mentions this issue: cmd/go/internal/modload: propagate errors from Query in 'list -versions'

@golang golang locked and limited conversation to collaborators Jun 6, 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.
Projects
None yet
Development

No branches or pull requests

2 participants