Closed

Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
go1.9 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env
)?
linux/amd64 (arch linux)
What did you do?
running gomobile install <package name>
fails when using a vendor directory to manage deps with the following error:
gomobile: gitlab.com/stackmesh/network does not import "golang.org/x/mobile/app"
This has been tested for both the included x/mobile examples and custom projects.
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
https://play.golang.org/p/HMsmNBlfwJ
run glide init && glide update
(should place a vendor dir in the project root),
run gomobile install <package name/gopath>
What did you expect to see?
The normal apk building messages and the upload logging.
What did you see instead?
gomobile: gitlab.com/stackmesh/network does not import "golang.org/x/mobile/app"
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
aYosukeAkatsuka commentedon Jan 15, 2018
From https://github.com/golang/mobile/blob/master/cmd/gomobile/build.go#L137 ,
This regex is used to lookup "golang.org/x/..." package from shared object generated by gomobile using nm, but I guess it is not consider the "golang/x/..." package is placed under vendor directory.
I don't see any reason why the package cannot be placed on vendor directory. I guess this should be like this to allow put them under vendor.
If it is acceptable change, I'll create CL. :)
Thanks!
eliasnaur commentedon Mar 15, 2018
That seems like a reasonable change. Please send a CL.
eliasnaur commentedon Mar 16, 2018
Dup of: #18903
gopherbot commentedon Mar 22, 2018
Change https://golang.org/cl/102095 mentions this issue:
cmd/gomobile: allow to put "golang.org/x/..." package under vendor
pankona commentedon Mar 22, 2018
@eliasnaur
Thank you for your comment!
I just sent a CL, please check it 💯
cmd/gomobile: support vendored "golang.org/x/mobile/..." packages
cmd/gomobile: support vendored "golang.org/x/mobile/..." packages