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

cmd/go: modules: use of internal package not allowed #26446

Closed
bradfitz opened this issue Jul 18, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@bradfitz
Copy link
Member

commented Jul 18, 2018

I just tried using modules at Go tip (b9761b1) with Perkeep (github.com/perkeep/perkeep).

Are these errors expected, @rsc, @bcmills?

$ cd $HOME
$ git clone https://perkeep.googlesource.com/perkeep
$ cd perkeep
$ go mod -init
...
$ go install ./server/perkeepd
...
../../src/mod/github.com/cznic/kv@v0.0.0-20170515202733-892ccf731fb7/kv.go:16:2: use of internal package github.com/cznic/internal/buffer not allowed
../../src/mod/github.com/cznic/lldb@v1.1.0/memfiler.go:13:2: use of internal package github.com/cznic/internal/file not allowed
../../src/mod/github.com/cznic/internal@v0.0.0-20170905175358-4747030f7cf2/buffer/buffer.go:36:2: use of internal package github.com/cznic/internal/slice not allowed

/cc @mpl

@bcmills

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

Dup of #23970. (github.com/cznic/internal is its own repo, and therefore its own module.)

I'm planning to fix this before the final 1.11 release, but it might not make beta2.

@sneko

This comment has been minimized.

Copy link

commented Sep 17, 2018

Hi @bcmills, did you fix that in the 1.11 release?

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 17, 2018

Yep.

@sneko

This comment has been minimized.

Copy link

commented Sep 17, 2018

I'm trying to use the Redigo library (for Redis), I'm able to run go mod tidy but when launching some tests with go test I get this error:

\go\src\mod\github.com\garyburd\redigo@v2.0.0+incompatible\redis\pool.go:28:2: use of internal package github.com/gomodule/redigo/internal not allowed

Maybe it's related to something else than this issue?

@sneko

This comment has been minimized.

Copy link

commented Sep 17, 2018

@bcmills

According to another repo I use for Redigo (go-redsync/redsync#21), they didn't release anything since 2016. I think that's the origin of my problem.

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 17, 2018

github.com/garyburd/redigo is not allowed to access github.com/gomodule/redigo/internal because github.com/gomodule/redigo is not a prefix of github.com/garyburd/redigo: this is working as designed.

If you intend for github.com/garyburd/redigo to replace github.com/gomodule/redigo, you'll need to use a replace directive and import via the latter path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.