-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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 has post-v0 module path ... at revision" with GOPROXY=direct, but not with proxy or Go 1.12 #33099
Comments
Interestingly,
|
The first time I tried to bisect this, I got an unrelated CL, but after repeating and removing my modcache every step, I got to CL 177958. Bisected by making a git repo with my setup and staging everything, then running |
Thanks for the clear reproducer — and for bisecting the CL. Should be an easy fix, I expect: we're probably missing a “not found” error classification on the CC @jayconrod |
(And, BTW, the “other command that doesn't ignore errors” that we usually use for testing is |
Change https://golang.org/cl/186237 mentions this issue: |
Yep, I knew Your CL works for me, thanks. |
Actually, scratch that, this is causing issues for dependencies I already have:
With a I don't disagree that those deps are "bad" in that they are v2+ versions with |
One other (minor) hitch: it turns out that a couple of our test modules (namely, github.com/rsc/vgotest1, vcs-test.golang.org/hg/vgotest1.hg, and vcs-test.golang.org/git/querytest.git/v3) have module-path mismatches and/or ambiguous |
@zikaeroh, the validation for |
(See also cenkalti/backoff#76 and gotestyourself/gotest.tools#156.) |
@bcmills I should I should further explain, then. This is what I observe with that CL merged:
At step 4, things break, as the proxy has given me revisions which I'm happy to open another issue to not broaden this one, as my original error case was fixed (but it almost feels like it just got moved somewhere else). |
That's #31428. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No on 1.12.7, yes on tip.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go.mod
:main.go
:tools.go:
Set
GOPROXY=direct
and rungo mod tidy
.What did you expect to see?
go.mod
populated withgit.luolix.top/maxbrunsfeld/counterfeiter/v6
at versionv6.2.1
.What did you see instead?
go mod tidy
does not modifygo.mod
. That's likely due to #27063, so I dogo build
instead and see:If
GOPROXY
is the default (https://proxy.golang.org,direct
), or I use Go 1.12.7, there aren't any issues.Note that this is a boiled down version of a real setup which uses thetools.go
pattern, but it doesn't matter where the import is for this to happen.EDIT: Forgot you can't import a main package without the
+build tools
to ignore the failure, so I moved this back to atools.go
version. This makes my message fromgo build
not actually happen since the tag isn't set, but the message probably shows up in some other command that doesn't ignore errors.The text was updated successfully, but these errors were encountered: