-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: cannot go get when all versions are retracted #42648
Comments
This is because proxy.golang.org isn't yet using go 1.16 that understands version retraction. According to #24031 (comment),
And according to golang.org/ref/mod
As go1.16 rolls out, proxy maintainers need to make sure either to implement the end point correctly, or let the go command fallback to direct (if users chose to do so) by responding with 404/410. It would be nice if the go command's error message gets improved though. |
So it looks like the proxy returns the highest release version from the
The first error message is a bit obscure, but I think it's reasonable. The
The second error message is less helpful. This one should explicitly mention that all versions were retracted.
I think a couple changes to the proxy are needed though:
@hyangah Does this sound reasonable? Should I open a separate issue for the proxy changes? |
@hyangah @jayconrod Any update on this as a release blocking issue for Go 1.16? |
This is not a release blocker. |
Thanks @hyangah, I just commented on the internal issue. I'd still like the I'm still planning to update the wording for the error message for 1.16, but it's not a release blocker. |
@jayconrod I commented internally - the proxy returns whatever |
Thanks for the reports and discussion @hyangah, @jayconrod, @toothrot, @bcmills! Given that this issue is a chicken and egg kind for closing out Go1.16 i.e. the proxy needs to be updated to Go1.16 for which it’ll then understand version retraction, yet this issue is marked for Go1.16, shall we mark this instead for Go1.17 or Backlog? |
Let's move this to Go1.17. There's an internal issue listing the changes needed for the proxy (b/173606721). I still need to improve the wording of the error message though. |
I just noticed the 1.16rc1 now behaves differently and the retraction doesn't seem to work as expected even in the direct mode.
Edit: Maybe false alarm. Adding |
proxy.golang.org uses 1.16 and now I see
@jayconrod is it ok to close this issue? Or do you want to keep this to track the error message improvement? |
Let's keep this open to track the error message improvement. |
I don't remember what the error message improvement here was, but the core issue has been addressed. If someone remembers or notices the bad error message to be fixed, we can file a separate issue for that. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Reproducible only with tip that understands 'retract' rules.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Module name: github.com/hyangah/retracttest/a
Retracted all released versions
[v1.0.0,v1.0.1]
- as noted in go.mod@v1.0.1What did you expect to see?
Retract only the released versions of a module. I thought I could let future users pick up the latest pseudo-versions after retraction - #41700.
What did you see instead?
I ended up making the entire module unavailable.
go get with
GOPROXY=direct
works though, so it could be bad interaction with proxy.golang.org.And go list result is confusing:
With default GOPROXY:
With GOPROXY=direct:
cc @jayconrod @bcmills @matloob @heschik @katiehockman
The text was updated successfully, but these errors were encountered: