Closed aybabtme closed 9 years ago
If indeed true, this is a bit strange.
The only package that imports sourcegraph.com/sourcegraph/appdash/internal/wire
is sourcegraph.com/sourcegraph/appdash
in collector_test.go
collector.go
and span.go
. appdash/cmd/appdash
does not directly import the appdash/internal
package.
The "internal" packages design doc says that:
$GOPATH/src/mypkg/internal/foo can be imported only by code in $GOPATH/src/mypkg.
So I would assume that this would work just fine? :/
I'll install Go 1.5 and see if I can reproduce this over the next few days. Sorry for the trouble it's causing you!
This might be related to https://github.com/golang/go/issues/11307.
@shurcooL Nice find! Thanks for linking to that :+1:
that explains that! thanks @shurcooL
This was fixed, so closing.
I'm still getting this error with Go 1.7. Haven't tried with other versions. Do you suppose I'm doing something wrong?
[andrei:~] ± go get github.com/sourcegraph/appdash
package github.com/sourcegraph/appdash
imports sourcegraph.com/sourcegraph/appdash/internal/wire: use of internal package not allowed
[andrei:~] ± go build
package github.com/sourcegraph/appdash
imports sourcegraph.com/sourcegraph/appdash/internal/wire: use of internal package not allowed
Oops false alarm, I wasn't using your canonical import path, with is sourcegraph.com
, not github.com
. Sorry about that.
In Go 1.5, the
internal/
package rule is enforced. When trying to build appdash, the build errors with a message:I think this means you'd have to move the
cmd/appdash
somewhere to be a root ofinternal
. Perhaps the easiest thing is to move./internal
to./cmd/appdash/internal
although it's not very elegant.