Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: remove +incompatible from http request when calling GOPROXY #26600
Go should remove the "+incompatible" suffix when making http Protocol requests to the GOPROXY. Since this suffix is added by Go and therefore the GOPROXY will not find that version.
What version of Go are you using (
This is working as intended - the canonical name for the version is v2.0.0+incompatible, to make very clear that we are opt-ing in to an incompatible variant of the v1 module path. The proxies are expected to respond to that name and not v2.0.0.
I assume you're running into this because you have a proxy that tries to fetch from the repo and can't find a tag with +incompatible in it, as part of Athens work.
I spoke to @arschles last week about providing a "fetch this module at this version for me" go command so that all the Athens code dedicated to turning git repos into module zip files can be dropped. It's critical to have just one copy, since if even one file is out of place the checksums won't match. Once I do that (soon!) then the proxy would get v2.0.0+incompatible, it would hand that back to the go command to fetch, and the go command would do the right thing. No special case code needed at all. Filed #26609 for that.
If you want to update Athens in the interim, strip the +incompatible and then look for that tag but be sure to fail if go.mod exists at that tag.