-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
plugin: not usable on another host using same go version and common dependencies #29055
Comments
Without modules, I have the same error: On host:
On container:
I think it's not related to #27751 because the version of gopkg.in/yaml.v2 is the same for "main" and "p1". About #26759, GOPATH could have an impact using modules? [Edit: fix mis-typed environment variable] |
The environment variable is mis-typed. Does anything change if you fix that? I'm not familiar with how modules work, so I may be wrong. My guess is that this issue and the other linked issues have similar underlying reason: it is sensitive to the source code path. With modules, the |
Sorry for the error but I confirm that the behavior is the same using GOPATH. The result of "go list" using modules :
|
@cherrymui you are right, if I define the same GOPATH (using modules or not), it works! |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
ArchLinux hostgo env
Docker golang:1.11.2What did you do?
I try to build plugin on host and use it on container. Versions of common dependencies are defined in go.mod.
p1/go.mod
p1/p1.go
main/go.mod
main/main.go
On host :
.../main $ go build -buildmode=plugin p1
On docker
.../main $ go run main.go
What did you expect to see?
Like on host:
What did you see instead?
Except the GOROOT, the package built seems the same:
On host:
On container:
The text was updated successfully, but these errors were encountered: