progrium/darwinkit

Examples fail on macos 13.4.1

Closed this issue · 6 comments

Using golang 1.20.4 and macos 13.4.1 on an intel machine, i get the following errors:

make pomodoro

go run ./examples/pomodoro
# github.com/progrium/macdriver/core
core/core_objc.gen.go:172:3: warning: class method '+localizedUserNotificationStringForKey:arguments:' not found (return type defaults to 'id') [-Wobjc-method-access]
core/core_objc.gen.go:884:3: warning: instance method '-shuffledArray' not found (return type defaults to 'id') [-Wobjc-method-access]
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:17:12: note: receiver is instance of class declared here
core/core_objc.gen.go:1075:9: warning: returning 'const void *' from a function with result type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# github.com/progrium/macdriver/cocoa
cocoa/cocoa_objc.gen.go:176:9: error: incompatible pointer to integer conversion returning 'id' from a function with result type 'BOOL' (aka 'signed char') [-Wint-conversion]
        return [NSEvent
               ^~~~~~~~
cocoa/cocoa_objc.gen.go:184:9: error: incompatible pointer to integer conversion returning 'id' from a function with result type 'BOOL' (aka 'signed char') [-Wint-conversion]
        return [NSEvent
               ^~~~~~~~
cocoa/cocoa_objc.gen.go:566:9: error: incompatible pointer to integer conversion returning 'id' from a function with result type 'BOOL' (aka 'signed char') [-Wint-conversion]
        return [NSView
               ^~~~~~~
3 errors generated.
make: *** [pomodoro] Error 1

Also other examples / trying to build/load the library fail with the very same errors;

Several previous versions fail similarly, but 0.0.2 seems to work out of the box

Running with the same os but on a m1/arm64 machine, it also works

I have the same question.

Looking into it.

@derphilipp can you try with the examples in the new version currently in main?

Since this code is no longer around and we are testing on GH Actions on intel macos-13, I'm going to close this for now. If there is still an issue on your platform please open a new issue.