-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add types to mapType #149
Add types to mapType #149
Conversation
I wasn't sure if I should include changes to generated files so I will include them here. |
@programmingkidx instead of attaching a patch could you push a commit? edit: doing so for you |
Is there anything else stopping this pull request from being merged? |
@tmc look good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
erh there seems to be a problem:
Error: core/core_objc.gen.go:4886:2: x redeclared in this block
Error: core/core_objc.gen.go:4883:7: other declaration of x
This is the error I see when I try to build a program with this commit in place:
I traced the issue to a method called ProvideImageDataBytesPerRowOrigin(). According to the documentation there is no method with this name. There is one called provideImageData:bytesPerRow:origin::size::userInfo:. I'm guessing this is a bug. My first idea to fix this issue was to open the json file for NSObject and change the argument's name from x to x1. Problem is there is no json file. I then did a grep search. It showed ProvideImageDataBytesPerRowOrigin to only be in the core/core_objc.gen.go file, so this means I am not sure where this method comes from. @tmc Any idea where the ProvideImageDataBytesPerRowOrigin() method comes from? |
I found where ProvideImageDataBytesPerRowOrigin() comes from. It is from api/objectivec/nsobject.objc.json. I fixed the problem by changing the name of the receiver variable. |
The current problem with this pull request is with a method called preservationPriorityForTag:. This is the error I see: macdriver/cocoa/cocoa_objc.gen.go:742:3: error: 'preservationPriorityForTag:' is unavailable: not available on macOS This is an issue with the API_UNAVAILABLE() macro. MacDriver does not currently have a system in place to handle this situation. |
Not sure how this issue fell out of the documented change proposed. Maybe that it opened up new methods to be supported that introduced these errors? Anyway, I made sure these types are supported in darwinkit, so I'm closing this PR. Thanks! |
A lot of methods are skipped by the wrapper generation system because the type they return on not in the mapType() function. To increase the number of Objective-C methods that are wrapped this patch adds support for these types: