progrium/darwinkit

Compilation warnings with v0.2.0

Closed this issue · 1 comments

Hi, I've started getting these errors since the v0.2.0 release:

$ make install
go install github.com/progrium/shelldriver/cmd/shellbridge@v0.2.0
# github.com/progrium/macdriver/core
../../../go/pkg/mod/github.com/progrium/macdriver@v0.2.0/core/core_objc.gen.go:172:3: warning: class method '+localizedUserNotificationStringForKey:arguments:' not found (return type defaults to 'id') [-Wobjc-method-access]
../../../go/pkg/mod/github.com/progrium/macdriver@v0.2.0/core/core_objc.gen.go:887:3: warning: instance method '-shuffledArray' not found (return type defaults to 'id') [-Wobjc-method-access]

I'm on an M1 mac with Big Sur (11.4). I get the same thing when I try to compile with emulation:

$ arch -x86_64 make install
go install github.com/progrium/shelldriver/cmd/shellbridge@v0.2.0
# github.com/progrium/macdriver/core
../../../go/pkg/mod/github.com/progrium/macdriver@v0.2.0/core/core_objc.gen.go:172:3: warning: class method '+localizedUserNotificationStringForKey:arguments:' not found (return type defaults to 'id') [-Wobjc-method-access]
../../../go/pkg/mod/github.com/progrium/macdriver@v0.2.0/core/core_objc.gen.go:887:3: warning: instance method '-shuffledArray' not found (return type defaults to 'id') [-Wobjc-method-access]

Is there something I can update to get this working?

I believe this is because we don't do anything to prevent methods that are not available yet on your version of macOS from being generated. We've started looking into this, but in the meantime you can suppress these warnings compiling with CGO_CFLAGS="-w"