-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Go modules bug #35
Comments
FWIW, I've hit this too. For me it's an indirect dep (i.e. the line go is complaining about in go.mod doesn't exist at all; it just exists in go.sum), and it seems your trick doesn't work:
|
I filed golang/go#30636, let's see what they say. |
same thing with |
FWIW the go bugs suggest it's an issue in the go.mod file or versions here, and that you can use a version that predates this issue. Adding an override to go.mod helped.
|
Looks like the problem is in the Line 1 in 8029fb3
it should be:
the same import should be fixed on go-isatty too I think. |
I don't use gopkg. So this is not a bug. |
The problem is with Here the steps to reproduce:
|
ah, now I see what you mean, I must import:
instead of:
that solved the issue for me. |
Having the same issue using with go and vgo. $ go fmt I'm not sure why it's trying to get it from gopkg.in. I have I'd rather not move my code under $GOPATH/src EDIT/UPDATE: The issue is just mod related, setting GO111MODULE=on will create this issue.
It seems go grabs it from github, but then decides to use gopkg.in I would like to add that a few months ago, I didn't have this issue (and I tested just now using an earlier version): These versions have no isssue when used together: |
I just noticed that this was in fact referenced here: #35 (comment) |
$ go get gopkg.in/mattn/go-colorable.v0
go: gopkg.in/mattn/[email protected]: parsing go.mod: missing module line
go: error loading module requirements $ go get gopkg.in/mattn/go-colorable
go: finding gopkg.in latest
go get gopkg.in/mattn/go-colorable: malformed module path "gopkg.in/mattn/go-colorable": invalid version $ env | grep -e "^GO"
GOBIN=/home/klay/go/bin
GOPROXY=https://goproxy.io
GO111MODULE=on
GOPATH=/home/klay/go $ go version
go version go1.12.7 linux/amd64 |
Here is a list of modules which incorrectly import this module via All of them are old forks of github.com/cheegaaa/pb. The issue in |
@mattn Nobody reported on this issue for 3 years. It can be closed. |
When trying to go get
go-colorable
fromgopkg
, I'm currently getting this message (using Go 1.12):It seems to me like there is some kind of conflict between the
gopkg.in/mattn/go-colorable.v0
actual package path and the name of the module declared in thego.mod
filegithub.com/mattn/go-colorable
.For now, forcing the use of the lib without the
go.mod
file in it solves the issue:The text was updated successfully, but these errors were encountered: