Pull in .hhi files when performing the type checking test for lowered coroutines
commit87f66ddd303e4819d5b4a30e299f9590f08e041f
authorMichael Tingley <tingley@fb.com>
Thu, 8 Jun 2017 20:09:24 +0000 (8 13:09 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 8 Jun 2017 20:14:24 +0000 (8 13:14 -0700)
tree36ade9467f79ac5dad7fda295799812cd579b6b4
parentd288f1af605f77393749bcaa6e8949c090686690
Pull in .hhi files when performing the type checking test for lowered coroutines

Summary:
Prior to this, we pulled in `ai_builtins.ml`'s definitions for a few builtin constructs. While this file is used for type checking, it is really the .hhi files that are authoritative in terms of defining the standard library. As we build out the coroutines standard library, it will be not only tedious but also dangerous to attempt to keep `ai_builtins.ml` in sync with the committed .hhi file changes.

Instead, `coroutine.ml` now slurps up all of the .hhi files it can find in the provided directory (specified with `--hhi-dir`), and adds them the parsing/naming/declaration/type checking that it performs during the test. I've updated the `TARGETS` files to ensure that the .hhi files will be available in the testing environment, and that the testing environment targets the correct path when slurping up the files.

Finally, I've reverted the coroutines changes to `ai_builtins.ml`, in order to discourage others from using this file for type checking purposes.

Differential Revision: D5162249

fbshipit-source-id: a41d11de05171dd5fdd854dc453d048088e129c7
hphp/hack/src/utils/sys_utils.ml