Page MenuHomePhabricator

Read extension classes and functions from `php_compat_info.json`.
ClosedPublic

Authored by joshuaspence on Jun 22 2014, 5:54 PM.
Tags
None
Referenced Files
F14027544: D9662.id23193.diff
Fri, Nov 8, 7:51 AM
F14021709: D9662.diff
Wed, Nov 6, 11:37 AM
F14017500: D9662.diff
Mon, Nov 4, 6:05 PM
F14004293: D9662.diff
Sat, Oct 26, 6:04 PM
F13998258: D9662.id23200.diff
Thu, Oct 24, 8:27 AM
F13987070: D9662.id.diff
Mon, Oct 21, 7:18 AM
F13979644: D9662.id23195.diff
Sat, Oct 19, 5:38 AM
F13979505: D9662.id23193.diff
Sat, Oct 19, 4:57 AM
Subscribers

Details

Summary

Consolidate php_extension_classes.txt and php_extension_functions.txt with php_compat_info.json. Given that php_extension_classes.txt and php_extension_functions.txt are manually generated whereas php_compat_info.json is generated automatically, this should make maintenance easier.

Test Plan

Deleted the src/.phutil_module_cache file (in each of rARC, rPHU and rP) and ran arc liberate.

Diff Detail

Repository
rARC Arcanist
Branch
symbols
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1301
Build 1301: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Read extension classes and functions from `php_compat_info.json`..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
scripts/phutil_symbols.php
515–518

For some reason, I couldn't use Filesystem or phutil_json_decode here?

scripts/phutil_symbols.php
515–520

Do we need interfaces here?

joshuaspence edited edge metadata.
  • Fix a typo
  • Prefer single quotes

What issue did you run into using that stuff?

scripts/phutil_symbols.php
515–520

Yes, if there are now extension interfaces -- I think when this was written there never were any. It probably should have been generalized anyway, but it would have been a little silly to check in an empty file just for future-proofing.

What issue did you run into using that stuff?

I didn't specifically run into any issues with phutil_symbols.php... it just seems nicer to use the existing PHP_CompatInfo data rather than a hand-crafted text file.

joshuaspence edited edge metadata.
  • Interfaces too

Oh, sorry -- I meant this, specifically:

For some reason, I couldn't use Filesystem or phutil_json_decode here?

That is, what issue did you hit doing that? The file uses other libphutil symbols, so it's not immediately obvious to me what the issue was. (That's not related to the hand-crafted files, right? Or am I misunderstanding?)

For testing, I think you can also remove src/.phutil_module_cache from all the libraries and re-liberate them. That won't completely test this stuff, but will at least give you confidence that your modifications can rebuild everything from scratch under at least one configuration -- i.e., your changes didn't completely torpedo everything.

Oh right... I get this:

./scripts/phutil_symbols.php 
PHP Fatal error:  Call to undefined function phutil_json_decode() in /home/joshua/workspace/github.com/phacility/arcanist/scripts/phutil_symbols.php on line 515

Oh right... I get this:

./scripts/phutil_symbols.php 
PHP Fatal error:  Call to undefined function phutil_json_decode() in /home/joshua/workspace/github.com/phacility/arcanist/scripts/phutil_symbols.php on line 515

Oh right... phutil_symbols_get_builtins() is executed at the very start of the script, before libphutil is loaded.

epriestley edited edge metadata.

Aaah, right.

This revision is now accepted and ready to land.Jun 22 2014, 6:21 PM
joshuaspence edited edge metadata.