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/cmd/gomobile: gomobile version shows error #34676
Comments
This seems to be another part of gomobile that does not work with the workflow assumed in the module mode. For version, it assumes there is a git repository checked out under GOPATH, which is no longer true in the module mode. @mandelmonkey What will happen if it is built with GOPATH mode?
|
@hyangah I get |
I cannot reproduce it.
|
@hyangah so the error says but I dont have go installed in the /usr/local/ directory is is in the go is installed in /Users/chris/ I need to install go globally? |
@mandelmonkey No. /usr/local/go/ is your GOROOT which you don't ever want to have gomobile source code at all. The second one (/Users/chris/go/...) is from your default GOPATH. Please check whether |
@hyangah
and here is the directory under /Users/chris/go/src/golang.org/x/mobile/.
|
Some strange shell issue? -x and -v are valid flags and it seems that it's not recognized. |
hmm not sure, something changed I get |
Again try Or go to an empty directory and run gomobile version. This time, try to avoid copy and paste. Seems like the copy-and-paste inserted extra characters like non-breaking space characters. |
no prob, I tried again And got
moved to an empty directory and ran these
|
Maybe try |
looks like only way I can version is to do outside off my app dir (containing go.mod) GO111MODULE=off go get -x -v -u golang.org/x/mobile/cmd/gomobile when I check version at my app dir : and again with without modules: |
also error in my project, where I just installed $ go install golang.org/x/mobile/cmd/gomobile@latest
go: downloading golang.org/x/mobile v0.0.0-20220407111146-e579adbbc4a2
$ gomobile init
$ gomobile version
gomobile version unknown: binary is out of date, re-install it |
Same issue here:
|
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.) |
What version of Go are you using (
go version
)?go1.13 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
ran gomobile version after
go get golang.org/x/mobile/cmd/gomobile
go init
What did you expect to see?
the version number
What did you see instead?
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
The text was updated successfully, but these errors were encountered: