Open
Description
Go version
go version go1.23.0.darwin-amd64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/2me2/Library/Caches/go-build'
GOENV='/Users/2me2/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/2me2/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/2me2/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/2me2/go/pkg/mod/golang.org/[email protected]'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/2me2/go/pkg/mod/golang.org/[email protected]/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.23.0'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/2me2/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/2me2/src/play/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/q_/16fwpggs3_z0skpfkj4_cnfm0000gn/T/go-build3768234229=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
go get golang.org/x/mobile/cmd/gomobile@latest
gomobile bind -target ios -x ./mobile
inside ./mobile is a file mobile.go that has the following:
package mobile
func Blah() int {
return 1
}
go.mod specifically specifies go1.23.0
What did you see happen?
~/src/play > gomobile bind -target ios -x ./mobile
GOMOBILE=/Users/2me2/go/pkg/gomobile
WORK=/var/folders/q_/16fwpggs3_z0skpfkj4_cnfm0000gn/T/gomobile-work-2833558045
rm -r -f "Mobile.xcframework"
GOOS=ios CGO_ENABLED=1 $GOPATH/bin/gobind -lang=go,objc -outdir=$WORK/ios -tags=ios 2me2test/mobile
GOOS=ios CGO_ENABLED=1 $GOPATH/bin/gobind -lang=go,objc -outdir=$WORK/iossimulator -tags=ios 2me2test/mobile
rm -r -f "$WORK"
gomobile: /Users/2me2/go/bin/gobind -lang=go,objc -outdir=/var/folders/q_/16fwpggs3_z0skpfkj4_cnfm0000gn/T/gomobile-work-2833558045/iossimulator -tags=ios 2me2test/mobile failed: exit status 1
no exported names in the package "2me2test/mobile"
no exported names in the package "2me2test/mobile"
no exported names in the package "2me2test/mobile"
no exported names in the package "2me2test/mobile"
What did you expect to see?
Expected to see everything work fine without the no exported names in the package errors. It works just fine if in go.mod I change the version to 1.22.x. Only seeing this issue in 1.23.x