Skip to content
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

failed go get -u github.com/colinmarc/hdfs due to v2? #142

Closed
chrislusf opened this issue Aug 13, 2018 · 11 comments
Closed

failed go get -u github.com/colinmarc/hdfs due to v2? #142

chrislusf opened this issue Aug 13, 2018 · 11 comments

Comments

@chrislusf
Copy link

chris:hdfs chris$ go get -u github.com/colinmarc/hdfs
package github.com/colinmarc/hdfs/v2/hadoopconf: cannot find package "github.com/colinmarc/hdfs/v2/hadoopconf" in any of:
/usr/local/go/src/github.com/colinmarc/hdfs/v2/hadoopconf (from $GOROOT)
/Users/chris/dev/gopath/src/github.com/colinmarc/hdfs/v2/hadoopconf (from $GOPATH)
package github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs: cannot find package "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" in any of:
/usr/local/go/src/github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs (from $GOROOT)
/Users/chris/dev/gopath/src/github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs (from $GOPATH)
package github.com/colinmarc/hdfs/v2/internal/rpc: cannot find package "github.com/colinmarc/hdfs/v2/internal/rpc" in any of:
/usr/local/go/src/github.com/colinmarc/hdfs/v2/internal/rpc (from $GOROOT)
/Users/chris/dev/gopath/src/github.com/colinmarc/hdfs/v2/internal/rpc (from $GOPATH)

@colinmarc
Copy link
Owner

What's your go version?

@chrislusf
Copy link
Author

chris:hdfs chris$ go version
go version go1.10 darwin/amd64

@chrislusf
Copy link
Author

Consider to avoid the versioning "v2" later? Hard to understand how the versioning works and how to fix it.

@chrislusf
Copy link
Author

btw: this used to work fine.

@colinmarc
Copy link
Owner

colinmarc commented Aug 13, 2018

Yup - I'm really sorry for the confusion. Can you check whether you have this patch? golang/go#25139

Should be in 1.10.3.

The v2 release uses the new go module thing, described best here. 1.9 and 1.10 go get is supposed to understand that, but it might require updating go. In any case, 1.11 definitely will.

Also, I recommend not using go get in production, if you are, because upstream changes can easily break your thing (as happened here). Either use the new module thing or plain vendoring.

@chrislusf
Copy link
Author

upgrading to 1.10.3 works! Thanks!

This is used in a open-sourced library. "go get" is easy to pick up.

@chrislusf
Copy link
Author

And thanks for the quick response!

@fanfansong
Copy link

But if you move code into vendor directory, it happend again.

@sinylei
Copy link

sinylei commented Dec 6, 2018

Still not working.

go get github.com/colinmarc/hdfs
Desktop/gowork/src/github.com/colinmarc/hdfs/client.go:14:2: use of internal package github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs not allowed
Desktop/gowork/src/github.com/colinmarc/hdfs/client.go:15:2: use of internal package github.com/colinmarc/hdfs/v2/internal/rpc not allowed

$ go version
go version go1.11.2 darwin/amd64

@pmalekn
Copy link

pmalekn commented Dec 20, 2018

It also doesn't work on go1.10.7 darwin/amd64 with glide

[INFO]  Found Gomfile in /Users/USER/.glide/cache/src/https-github.com-grafov-m3u8
[INFO]  --> Parsing Gomfile metadata...
[INFO]  --> Fetching updates for github.com/opentracing/opentracing-go
[INFO]  --> Fetching updates for google.golang.org/grpc
[INFO]  --> Fetching updates for go.opencensus.io
[ERROR] Error scanning github.com/colinmarc/hdfs/v2/hadoopconf: cannot find package "." in:
        /Users/USER/.glide/cache/src/https-github.com-colinmarc-hdfs/v2/hadoopconf
[ERROR] Error scanning github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs: cannot find package "." in:
        /Users/USER/.glide/cache/src/https-github.com-colinmarc-hdfs/v2/internal/protocol/hadoop_hdfs
[ERROR] Error scanning github.com/colinmarc/hdfs/v2/internal/rpc: cannot find package "." in:
        /Users/USER/.glide/cache/src/https-github.com-colinmarc-hdfs/v2/internal/rpc

which is a pain because it's a transitive dependency and I have my hands tied. Any ideas on how to approach this?

@pseudocodes
Copy link

would you please just rename the ‘internal’ package ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants