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

x/mobile: gomobile version doesn't work when not checked out under GOPATH or not built in GOPATH mode #37654

Open
davidsteed opened this issue Mar 4, 2020 · 3 comments
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@davidsteed
Copy link

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

$ go version
go version go1.13.4 linux/amd64

Does this issue reproduce with the latest release?

yes

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

amd64
linux

What did you do?

gomobile version
gomobile version unknown: mobile repo git log failed: exit status 128, fatal: not a git repository (or any of the parent directories): .git

@hyangah
Copy link
Contributor

hyangah commented Mar 4, 2020

For now, the gomobile needs to be checked out under GOPATH and built in GOPATH mode.
Maybe we can now stop doing that and move to use the runtime/debug.ReadBuildInfo or go version -m.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. mobile Android, iOS, and x/mobile labels Mar 4, 2020
@dmitshur dmitshur added this to the Unreleased milestone Mar 4, 2020
@dmitshur dmitshur changed the title go mobile version not working x/mobile: gomobile version doesn't work when not checked out under GOPATH or not built in GOPATH mode Mar 4, 2020
@daluu
Copy link

daluu commented Mar 24, 2020

Can you clarify what it means to "build in GOPATH mode"? What is this alternate build method from the standard instructions of go getting the package.

@daluu
Copy link

daluu commented Mar 24, 2020

Well, for me, the following worked, so maybe this what was meant for how to build. Just go get the gomobile package from any directory without a go.mod file.

When I did it inside a directory with go.mod, the source code wasn't copied to $GOPATH src tree, and the binary seems to be functioning improperly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants