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: reverse binding not working anymore? #50608

Open
timcooijmans opened this issue Jan 14, 2022 · 0 comments
Open

x/mobile: reverse binding not working anymore? #50608

timcooijmans opened this issue Jan 14, 2022 · 0 comments
Labels
Milestone

Comments

@timcooijmans
Copy link
Contributor

@timcooijmans timcooijmans commented Jan 14, 2022

What version of Go are you using (go version)?

$ go version
go version go1.17.6 linux/amd64

$ gomobile version
golang.org/x/mobile/cmd/gomobile@latest

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
 go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/root/sdk/go1.17.6"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/root/sdk/go1.17.6/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17.6"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/build2/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2412464046=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Create a file in a module that uses reverse binding:

package gomobiletest


import (
        "log"
        "Java/android/content"
)

func Test(androidctx content.Context)  {
        apkPath := androidctx.GetPackageResourcePath()
        log.Println(appPath)
}

and run

gomobile bind

What did you expect to see?

A successful compile

What did you see instead?

A successful compile with the method ignored.

@gopherbot gopherbot added this to the Unreleased milestone Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants