-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: Error running gomobile init
Go 1.17
#50994
Comments
Same issue here: |
I got the same problem. |
As suggested, |
@changkun Do you suggest we create a dummy go module and run
|
I think so. As far as I understood the issue, you are executing and running
We can simply follow the suggestion |
It won't work with vendoring.
|
Well, vendor mode is probably a different issue, without vendor mode "go get golang.org/x/mobile/cmd/gobind" works fine. |
@kordax You are right that vendor mode is a different issue. If your vendor folder does not contain golang.org/x/mobile/cmd/gobind, then it certainly cannot find such a package and throw an error. |
@changkun well, the vendor folder does not contain Gobind because it doesn't work properly with |
Would this snippet fix the issue?
|
I think so. Feel free to send a CL for that :) |
Thanks, will do so |
Go install requires a version to be provided after the package name. gomobile init command is updated to reflect this new requirement Fixes golang/go#50994
Change https://go.dev/cl/384414 mentions this issue: |
After recent changes with the way Go modules works in Go 1.16 and Go 1.17, we are seeing issues with
gomobile
.The line codde that related to this issue is:
https://github.com/golang/mobile/blob/master/cmd/gomobile/init.go#L81
i.e., installing a command now requires a version such as
If we try running
gomobile init
from a go module we also get an error:Go version:
Go env:
The text was updated successfully, but these errors were encountered: