Closed fredemmott closed 9 years ago
I think there's value in having two packages - One can use Hack while the other can use plain PHP. There's a hackified fork of the XHP code (I think it's this one from @Swahvay https://github.com/facebook/xhp/tree/hack). The way I see it, facebook/xhp should be plain PHP and work on both PHP and HHVM, whereas hhvm/xhp should be Hack and only work on HHVM (but maybe with more obvious names like facebook/xhp for PHP and facebook/xhp-hack for Hack). Having said that, both could live in the same repository.
cc @pvh as well since he's the maintainer of the hhvm/xhp package.
I don't think there's a need for two packages - can't you choose between following dev-master vs dev-hack, and tagging the versions separately?
Also, this depends on what the plan is for supporting both branches, regardless of composer.
Alternatively, the php-lib could be removed from this repository, and another repository becomes the canonical source for it. if we end up with a separate canonical source for php-lib, it needs to retain history, including tags. The current forks appear to be a copy of the files, without full history. It should either be a fork with everything else removed, or a fork with git-filter-branch done to remove it.
This one I'd prefer.
I'm planning to:
The primary motivations are:
I'll probably do this on the 15th-19th or early next year. Feedback very welcome :)
cc @simonwelsh
I don't really use the PHP version (I've got it installed on one server I haven't migrated to HHVM yet), so removing that doesn't worry me ;)
I was planning on PRing the removal of everything other than the phplib for the Hack branch, so that it can be used with composer or submodules without all of this redundant cruft. :+1: for doing that.
The main problem with maintaining the PHP5 and Hack classes is keeping them in sync. That's still a problem now though, so this won't change this. I suspect that once PHP7 is released, it won't make sense to maintain the PHP classes without updating the extension, so that may sort itself out in the next couple of years anyway.
You'll probably want to talk to @RdeWilde about taking over the facebook/xhp composer package, or use facebook/xhp-lib instead.
To help with having Hack and PHP versions of the same package, I currently tag my projects with different major versions (2.* for Hack, 1.* for PHP). Allows for people to use tagged versions for the right branch while still getting updates.
If you need to take over any package, just let me now, fine with me.
Almost ready to go:
https://github.com/facebookarchive/xhp-php5-extension https://github.com/fredemmott/xhp-lib
Plan is:
Still agree with the splitting of xhp-lib and xhp-php5-extension, though still not a huge fan of archiving the extension.
In practice, Facebook already doesn't support the PHP5 extension, and hasn't for some time. Archiving it is just making this clear, not really changing anything.
My observation has been that the facebookarchive account is essentially where already-dead projects go to become more dead; I couldn't find a single one that had any commits since being moved there, and the ones I looked at hadn't had any commits in over a year prior to being archived. On the other hand, I have contributed a number of fixes to the extension in the past few months, and have been working on adding support for PHP 5.6 syntax.
Obviously I can just fork the repo and go from there (yay open source), but the biggest issue at play is discoverability. I do think XHP has value outside of its use in HHVM.
Long-term, XHP is dead outside of HHVM unless there's sufficient interest and commitment to both maintain the PHP5 extension, and to create a PHP7 extension; this commitment isn't going to come from Facebook, and we want to make this clear.
We'll be happy to link to a canonical fork if there's a consensus.
Done, and composer.json added. Composer package is 'facebook/xhp-lib'.
cc @ptarjan @daniel15 @rdewilde @Swahvay
Thoughts: