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: |
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: