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/bind: go test golang.org/x/mobile/bind fails on macOS #35148

Closed
hajimehoshi opened this issue Oct 25, 2019 · 3 comments
Closed

x/mobile/bind: go test golang.org/x/mobile/bind fails on macOS #35148

hajimehoshi opened this issue Oct 25, 2019 · 3 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@hajimehoshi
Copy link
Member

hajimehoshi commented Oct 25, 2019

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

$ go version
go version go1.13.1 darwin/amd64

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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hajimehoshi/Library/Caches/go-build"
GOENV="/Users/hajimehoshi/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/hajimehoshi/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ht/ky_bwgzs4bd5z1hh02k34x_h0000gn/T/go-build727591461=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

cd $(go env GOPATH)/src/golang.org/x/mobile
go test ./bind

What did you expect to see?

No failures

What did you see instead?

Test fails with a lot of messages:

--- FAIL: TestGenGoObjcWrappers (1.43s)
    bind_test.go:508: testdata/objc.go: does not match Go golden:
        --- /var/folders/ht/ky_bwgzs4bd5z1hh02k34x_h0000gn/T/go438678956        2019-10-25 16:39:50.000000000 +0900
        +++ /var/folders/ht/ky_bwgzs4bd5z1hh02k34x_h0000gn/T/go654155585        2019-10-25 16:39:50.000000000 +0900
        @@ -1,4 +1,4 @@
        -//File is generated by gobind. Do not edit.
        +// Code generated by gobind. DO NOT EDIT.

         package ObjC

        @@ -13,8 +13,7 @@

         type Foundation_NSObjectC interface {
         }
        -
        -// File is generated by gobind. Do not edit.
        +// Code generated by gobind. DO NOT EDIT.

         package main

        @@ -24,11 +23,12 @@
         import "ObjC"
         import _seq "golang.org/x/mobile/bind/seq"

        -type proxy interface { Bind_proxy_refnum__() int32 }
        +type proxy interface{ Bind_proxy_refnum__() int32 }

         // Suppress unused package error

         var _ = _seq.FromRefNum
        +
         const _ = ObjC.Dummy

         func init() {
        @@ -51,11 +51,11 @@
         type proxy_class_NSObjectC _seq.Ref

         func (p *proxy_class_NSObjectC) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
        +// Code generated by gobind. DO NOT EDIT.

         // Package main is an autogenerated binder stub for package objc.
        -//   gobind -lang=go objc
         //
        -// File is generated by gobind. Do not edit.
        +//   autogenerated by gobind -lang=go objc
         package main

         /*
        @@ -76,12 +76,18 @@

         type proxyobjc_D _seq.Ref

        -func (p *proxyobjc_D) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
        +func (p *proxyobjc_D) Bind_proxy_refnum__() int32 {
        +       return (*_seq.Ref)(p).Bind_IncNum()
        +}

...

golang/mobile@6d0d39b seems related.

CC @hyangah

@gopherbot gopherbot added this to the Unreleased milestone Oct 25, 2019
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Oct 25, 2019
@hajimehoshi
Copy link
Member Author

#34619 is related

@hyangah
Copy link
Contributor

hyangah commented Oct 25, 2019

Golden file update for objC was forgotten.
Can you reproduce the golden file by running the test with -update flag (https://github.com/golang/mobile/blob/master/bind/bind_test.go#L33)
and send a cl? Thanks!

@gopherbot
Copy link

Change https://golang.org/cl/203398 mentions this issue: bind: update the golden data for Objective-C

@golang golang locked and limited conversation to collaborators Oct 24, 2020
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Fixes golang/go#35148

Change-Id: I4ee2b667e1eb3df3f263a66671cf7d6a89804830
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/203398
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Fixes golang/go#35148

Change-Id: I4ee2b667e1eb3df3f263a66671cf7d6a89804830
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/203398
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

3 participants