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
Closed

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

bradfitz opened this issue Jul 18, 2018 · 6 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bradfitz
Copy link
Contributor

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

@bradfitz bradfitz added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules labels Jul 18, 2018
@bradfitz bradfitz added this to the Go1.11 milestone Jul 18, 2018
@bcmills
Copy link
Contributor

bcmills 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
Copy link

sneko commented Sep 17, 2018

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

@bcmills
Copy link
Contributor

bcmills commented Sep 17, 2018

Yep.

@sneko
Copy link

sneko 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
Copy link

sneko 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
Copy link
Contributor

bcmills 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.

@golang golang locked and limited conversation to collaborators Sep 17, 2019
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants