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

Comments

@garry415
Copy link

commented Sep 10, 2015

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

This comment has been minimized.

Copy link
Contributor

commented Sep 14, 2015

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link

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 label May 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.