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: type aliases no longer export #71827

Open
xcolwell opened this issue Feb 19, 2025 · 3 comments
Open

x/mobile: type aliases no longer export #71827

xcolwell opened this issue Feb 19, 2025 · 3 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. 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

@xcolwell
Copy link

Go version

go version go1.24.0 darwin/arm64

Output of go env in your module/workspace:

AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE='auto'
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/brien/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/brien/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/r3/v_3z60rx2cxg0s1r9tl9fbmw0000gn/T/go-build844271096=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/brien/bringyour/sdk/go.mod'
GOMODCACHE='/Users/brien/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/brien/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/brien/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.24.0'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

A simple non-generic type alias used to export correctly with gomobile bind. Now the type alias is not exported.

type Foo = int

Anywhere the type alias is used will also not be exported, with a "skipped" message similar to below

// skipped field Bar.MyFoo with unsupported type: my/package.Foo

What did you see happen?

Latest 1.24 release

What did you expect to see?

Type aliases would export as they have in the past.

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Feb 19, 2025
@gopherbot gopherbot added this to the Unreleased milestone Feb 19, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Feb 19, 2025
xcolwell added a commit to urnetwork/sdk that referenced this issue Feb 19, 2025
This is temporary until we can figure out golang/go#71827
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 19, 2025
@mknyszek
Copy link
Contributor

Is this possibly a duplicate of #70698?

@xcolwell
Copy link
Author

Is this possibly a duplicate of #70698?

Setting GODEBUG=gotypesalias=0 does appear to solve the issue.

export GODEBUG=gotypesalias=0
gomobile bind ...

xcolwell added a commit to urnetwork/sdk that referenced this issue Feb 19, 2025
It looks like gomobile needs to be updated to handle the new alias behavior.
golang/go#71827

Revert this when gomobile is fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. 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

4 participants