-
Notifications
You must be signed in to change notification settings - Fork 18k
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
x/vgo: "use of internal package not allowed" unclear #25164
Comments
Hello there @EwanValentine, thank you for filling this bug! For starters, could you please post perhaps a way of others reproducing this bug? I ask because currently your reproduction is The go/src/cmd/go/internal/load/pkg.go Lines 734 to 742 in b7f1777
If you'd like to get your hands dirty, perhaps a fmt.Printf right above those lines e.g @@ -726,6 +726,9 @@
return p
}
+ fmt.Printf("\nsrcDir: %q cleaned: %q\nparent: %q cleaned: %q\n\n",
+ srcDir, filepath.Clean(srcDir), parent, filepath.Clean(parent))
+
// Internal is present, and srcDir is outside parent's tree. Not allowed.
perr := *p
perr.Error = &PackageError{ and then rerun Thank you. |
I tried to follow your instructions, hope it can help.
|
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Speaking up, please reopen. Required info was submited 5 days ago. |
Bad @gopherbot. |
@EwanValentine's original problem is that vgo decided to use github.com/gomodule/redigo version v1.6.0, the latest v1 tag in that repo, but that tag is broken code. It contains imports assuming that the code is github.com/garyburd/redigo not gomodule. The working code is tagged v2.0.0 but the v2.0.0 tag is ignored because this is redigo not redigo/v2. Even so,
will do the right thing (replacing v2.0.0 with the corresponding pseudo-version) and will make the build start working. I will also look into making this error message print the name of the internal package being imported. @cznic, your problem is a bit different. You are expecting internal to work across module boundaries, which I'm not sure we ever intended. That's tracked by #23970. |
Change https://golang.org/cl/116761 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.10.1
Does this issue reproduce with the latest release?
Quite likely
What operating system and processor architecture are you using (
go env
)?What did you do?
Ran
$ vgo build
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
For vgo to install dependencies and generate a valid go.mod file.
What did you see instead?
vgo got most of the way through the install process before finally throwing the following error:
I'm using
redigo
as a top level package, but I'm not directly importing the file that seems to be throwing the errorpool.go
.The text was updated successfully, but these errors were encountered: