This is more a longish-term task list issue to help track migrating extensions from IDL to HNI. I'll try to keep it updated as the migration progresses and include hints/types/recommendations as I come across them.
As part of this I'm also tidying up some of the API where possible, trying to move away from Variant if only a single type's expected/returned and getting everything working with ZendParamMode.
I'm using 512ecad as an example of what to do.
Existing idl files:
My current observations: (please correct if these are wrong)
doing all at once could make it really hard to review..?
Also, would be really boring to do ;)
I was thinking of using this more as organising/tracking and then doing one extension at a time (for instance, I'm currently doing ext/reflection) and keeping a record of things that I've discovered if others want to help.
ah got it now... ;-).
Thanks for working on this @simonwelsh!
This is awesome. Making sure @ptarjan and @sgolemon are a permanent part of this thread too...
Wow, awesome! I'd love if the IDL machinery died.
@jdelong and I were chatting about this, and migrating them is a great time to clean them as they move over.
I started working on mongo, but it will take some time ;)
Hi all,
What is an IDL? What it's differents with HNI?
And I know about HNI from the last release note: Hhvm Native Interface -> Possibility to call c++ function from PHP.
But I still not sure about these two and can't found any documentation about them.
-Aris
Thanks for taking this on @simonwelsh . Are you using a script that reads in .idl.json and produces the .php declarations? If so, is that script checked in as part of these conversion commits?
@elgenie No, I'm doing it all by hand, basing of the PHP docs, then what the function actually returns. I've found that the IDL files aren't accurate enough to convert directly, so just deciding to skip the segfaults from mismatching types.
tools/docskel/docskel.php uses the Zend docs to create a HNI skeleton. At least I think that was the script I used when I created that start of mysqli. But @sgolemon should know more.
@WizKid Sweet, that'll save me copy+pasting the descriptions. Still have to manually do the signatures, given how many edge cases the signature in the docs doesn't cover. Or things like bzopen with completely undocumented (but tested) features (it can take an open file resource instead of a filename).
@simonwelsh Yea it is far from perfect but it usually give you a good start.
What's a reason for having Bountysource record for this one? Is it actual? (I can help with porting..)
@igorastds: There is a lot of otherwise relatively thankless work to do here that, once complete, will allow us to clean up the extensions story. It is to encourage community assistance with that.
These all-encompassing bug bounties are very off-putting.
@dewyatt, we've provided the feedback to Bountysource that it would be better to have an integrated way to do this without creating 70 additional open issues on the project. Unfortunately there's no support for that at the moment.
@simonwelsh do we need to add XSL https://github.com/facebook/hhvm/commit/72ed6498a7c5d28ca6c6b9a79ba07d00f7f9fb06 to the todo-list?
@staabm Already have. Has put the amount merged back below 15% :(
@simonwelsh gd is missing in this list and was done by sarah in https://github.com/facebook/hhvm/commit/5fc0301a343de843370d811b02bb8d4109fd454b
@staabm This is a list of the IDL files. GD used image.idl.json.
@simonwelsh what do you think about port yaml ext to native? instead of ZendCompat? worth it?
@simonwelsh #2471 will allow closures in systemlib.
50% of the IDL files are now gone :cake: :smile:
Just a poke to point out this hasn't been updated in almost a year. Also, I just noticed that this has a $1000 bounty on it on bountysource.
@sgolemon's got this! She has asio and simplexml in the pipeline; next up is collections.
Only the remainder of collections left :D
Woot woot :)
Most helpful comment
Woot woot :)