Re: [Pyobjc-dev] framework bindings for OSX 10.11
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2015-07-23 13:14:28
|
> On 21 Jul 2015, at 18:31, Ronald Oussoren <ron...@ma...> wrote: > > >> On 21 Jul 2015, at 17:01, Ronald Oussoren <ron...@ma...> wrote: >> >> Hi, >> >> I was stupid enough to start working on the framework bindings for OSX 10.11, and guess what: the tool for generating the metadata doesn’t work with the 10.11 headers due to unexpected breakage in libclang (for some reason the type attribute of some nodes no longer revers to the actual type but some “UNEXPOSED” node instead). The headers for 10.10 work fine with the same compiler… Sigh…. >> >> I’ll see if I can work around this problem, but this does mean that generating the 10.11 bindings will take longer than I had hoped. And that’s already way longer than it should be, but I have plans to reduce the amount of work needed. >> >> Back to fighting with tools, > > I have found why I run into problems, but haven’t found a solution yet. The problem is that there are implicit __nonnull attributes on values (or types) and that attribute type is not exposed through libclang (or maybe there’s just a problem with the python bindings to libclang, but the former seems more likely). > > Now just to find a way around this… I haven’t found a way around this and have decided not to spent more time fighting libclang for now. For now I’ll just maintain the bindings completely by hand. I’ve done some restructuring on my machine that should make this easier, at least once I’ve done a pass through the beta3 headers for all frameworks that already have bindings. This sucks, but I don’t think I’ll find a better solution without hacking on libclang and that’s not something I’m willing to do at the moment (and even then it wouldn’t help, I could only use the result when the resulting patch would be used in the libclang that shipped with Xcode). Maybe I should “just” write my own Objective-C parser in Python later on ;-) Ronald |