Navigation Menu

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 with gopkg.in #26496

Closed
stapelberg opened this issue Jul 20, 2018 · 4 comments
Closed

cmd/go: modules: use of internal package not allowed with gopkg.in #26496

stapelberg opened this issue Jul 20, 2018 · 4 comments

Comments

@stapelberg
Copy link
Contributor

I have read #26446, but I think the usage of gopkg.in might make things different enough that a separate issue is warranted.

What version of Go are you using (go version)?

go version go1.11beta2 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/michael/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/michael/go"
GOPROXY=""
GORACE=""
GOROOT="/home/michael/sdk/go1.11beta2"
GOTMPDIR=""
GOTOOLDIR="/home/michael/sdk/go1.11beta2/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/benchmark/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build494706699=/tmp/go-build -gno-record-gcc-switches"

What did you do?

/tmp % git clone https://github.com/robustirc/benchmark
Cloning into 'benchmark'...
remote: Counting objects: 6682, done.
remote: Total 6682 (delta 0), reused 0 (delta 0), pack-reused 6682
Receiving objects: 100% (6682/6682), 14.06 MiB | 12.49 MiB/s, done.
Resolving deltas: 100% (1893/1893), done.
/tmp % cd benchmark
/tmp/benchmark master % go mod -init
go: creating new go.mod: module github.com/robustirc/benchmark
go: copying requirements from Gopkg.lock
/tmp/benchmark master % go build cmd/throughput/throughput.go 
/home/michael/go/src/mod/github.com/sorcix/irc@v1.1.3/message.go:11:2: use of internal package gopkg.in/sorcix/irc.v1/internal not allowed
@oiooj oiooj added the modules label Jul 20, 2018
@oiooj
Copy link
Member

oiooj commented Jul 20, 2018

Duplicate of #23970. Actually, it's the same issue, feel free to reopen it if have any question.

@oiooj oiooj closed this as completed Jul 20, 2018
@stapelberg
Copy link
Contributor Author

Are you sure about this? As I said, I have read the other issues, but in my case, the package is not using an “internal” package outside of the repository, it’s inside the same repository, but not recognized as such due to gopkg.in being in the mix.

@oiooj
Copy link
Member

oiooj commented Jul 20, 2018

A dep of your project have a "internal" package, gopkg.in/sorcix/irc.v1/internal

@stapelberg
Copy link
Contributor Author

Yes, but #23970 is about cross-module internal imports, which is not the case here. The package in question is gopkg.in/sorcix/irc.v1, which imports gopkg.in/sorcix/irc.v1/internal.

The import is within the same module, but the problem is that the gopkg.in path is translated, I think.

@golang golang locked and limited conversation to collaborators Jul 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants