-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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 module warning about non-....v0 versions? #30636
Comments
Just to be clear, the thing we can fix here is the error message, not the fact that the error exists. (The |
So what's the workaround for those of us who are using packages with these kinds of |
Pretty much, yes. (Send PRs, and avoid dependencies that use the wrong upstream paths.) You may also find that you can make things sort-of-work by running |
It would also be handy to print out which repo has the bad import. As it stands right now I have to clone all the deps and grep them all. |
The repositories github.com/mattn/go-colorable and github.com/mattn/go-isatty have moved to using go modules; using gopkg.in to import them breaks: golang/go#30636 Let's use the real URLs with hashes. Signed-off-by: Tycho Andersen <tycho@tycho.ws>
See golang/go#30636 Signed-off-by: Tycho Andersen <tycho@tycho.ws>
In #30831 we're considering some mechanism for modules to declare other aliases by which they were previously known. That seems like it could help with the (But let's keep the discussion about renaming over there, and focus this issue on the inscrutable error message.) |
This is not ideal but a relatively painless workaround until the upstream fixes its imports is using replace. Something like the following can be used. Note that if you have dependencies that use both the replace must not use the same version between them. Would be nice if go mod had an
|
Seems a lot less relevant these days now that ~everything has a go.mod. |
What version of Go are you using (
go version
)?What did you do?
Run go get -u in this repository: https://github.com/tych0/go-bug
What did you expect to see?
Success.
What did you see instead?
The indecipherable error above :).
In particular, the repo I'm actually having this problem in has go as an indirect dep (i.e. the line gopkg.in/mattn/go-colorable doesn't occur in go.mod at all). However, the error message is the same (it complains about go.mod, even though the line isn't in there at all).
The text was updated successfully, but these errors were encountered: