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.

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: mknyszek

Is this possibly a duplicate of #70698?

Comment From: xcolwell

Is this possibly a duplicate of #70698?

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

export GODEBUG=gotypesalias=0
gomobile bind ...

Comment From: fortuna

I'm having the same issue, and @xcolwell 's workaround fixed the issue for me.

The code generation code probably needs to call Unalias on the Alias types, as per https://pkg.go.dev/go/types#Alias.