-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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.mod' file loading fails to detect invalid pseudo-versions #32662
Comments
Thanks for the excellent report. This looks like a bug in the go command to me:
Note that it uses the canonicalized pseudoversion to download the .mod, but not the .zip. I'd like to hear an opinion from @bcmills @jayconrod on what's going on here. I think we may have to support these kinds of requests in |
This is closely related to #27173. I'm still investigating how frequent these are in practice. With the current draft of CL 181881, I get a more consistent failure using the proxy:
|
Note specifically the fixes to |
Change https://golang.org/cl/181881 mentions this issue: |
Go version: Go 1.12.6
The following command fails:
GOPROXY=https://proxy.golang.org GOPATH=/tempdir go install github.com/golangci/golangci-lint/cmd/golangci-lint
The failure error comes out to be:
It turns out that golangci-lint's go.mod file has an incorrect timestamps in the pseudo-semver version:
v0.0.0-20181204210945-1df300866540
because they updated the go.mod file manually which seems to be here (golangci/golangci-lint@7274db7#diff-37aff102a57d3d7b797f152915a6dc16R8)If you run:
curl https://proxy.golang.org/github.com/go-critic/go-critic/@v/v0.0.0-20181204210945-1df300866540.info
You get
Notice that the timestamp here is
20190526074819
while the golangci's go.mod file is20181204210945
. See here: https://github.com/golangci/golangci-lint/blob/master/go.mod#L8Since the
.info
endpoint succeeds and returns a different version, I'm surprised that the Go command did not pick up the new version for the following.zip
call. Is this the expected behavior?Interestingly enough,
go mod download
doesn't care about the timestamp, and since it's the recommended tool to use,GOPROXY=off
andGOPROXY=<athens>
succeed but proxy.golang.org fails.cc: @fsouza
The text was updated successfully, but these errors were encountered: