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/cmd/gomobile: gomobile bind returning io.Reader errors #12571

Open
garry415 opened this issue Sep 10, 2015 · 3 comments
Open

x/mobile/cmd/gomobile: gomobile bind returning io.Reader errors #12571

garry415 opened this issue Sep 10, 2015 · 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

@garry415
Copy link

I'm running into an error when running "gomobile bind --target=ios":
gomobile: type io.Reader not defined in package package goax ("github.com/garry415/goax")

unsupported, direct named type github.com/garry415/goax.KeyExchange: struct{IdentityPublic []byte "bencode:"identity""; Dh []byte "bencode:"dh""; Dh1 []byte "bencode:"dh1""}

I'm importing "io" and KeyExchange has only private fields. I don't think it should report this error.

Environment: Go 1.5, OS X Yosemite 10.10.4

@crawshaw
Copy link
Member

That first error is surprising. If you try with the go tool, does your package compile?

The second error is an existing limit of gobind. It can work on *KeyExchange, but not KeyExchange. (We are considering support for the latter, but there's a lot to do and few of us to do it.)

@garry415
Copy link
Author

garry415 commented Oct 2, 2015

it compiles under go build, just not under gomobile bind. here's a gist of what fails: https://gist.github.com/garry415/bd83a3693bf03dbd5438

@rsc rsc added this to the Unreleased milestone Oct 23, 2015
@mehlon
Copy link

mehlon commented Mar 8, 2016

It seems the error is because you're using an external type, doing something like this works: https://gist.github.com/mehlon/233261a982d81bfbf5de.

@andybons andybons changed the title gomobile bind returning io.Reader errors x/mobile/cmd/gomobile: gomobile bind returning io.Reader errors May 14, 2019
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label May 14, 2019
@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 14, 2019
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

6 participants