user-documentation
user-documentation copied to clipboard
Stop using the HHVM test runner
Future work: blocked by having a good parallelism API. Likely going to be something convenient around xbox.
We have a mostly-compatible implementation of .expectf, .expectregex already for .typechecker.expectf: we no longer use run.php --typechecker: we can assume that 'No errors' tests have been verified by the repo-level hh_client call - so we can skip them for performance.
We use it for runtime tests still as we really really want the parallelism it offers, as we can't take a similar shortcut.
Benefits are:
- including features (like .cli_args) in run.php that are not used by HHVM is painful
- can potentially provide a better developer experience (e.g. test failure output) by using libraries - run.php must be standalone
- can start listing each example as a separate test in hacktest output
It should remain compatible (or 'close enough') so that people working on features can contribute documentation examples in a format they're familiar with.
Actually a big chain of blockers here:
- run tests in parallel
- ... add a zero-config way to do parallelism in hack
- decide on an entrypoint mechanism for that
- .... but internal teams don't want a new entrypoint mechanism that depends on PHPisms, so add a $GLOBALS-free entrypoint mechanism
- ... which also includes the input/output handles, so get HSL IO builtin