Releases: hhvm/hh-clilib
Support HHVM 4
v2.1.0 update dependencies
Updated hsl-experimental dependency
This release requires hsl-experimental 3.28.5, as an implementation detail of the terminal input/output handles
Use the hsl-experimental IO interfaces
This release replaces InputInterface
and OutputInterface
with the hsl-experimental IO interfaces; see https://github.com/hhvm/hsl-experimental/releases/tag/v3.29.2
These are truly non-blocking and async; when specific ordering is required (e.g. for REPLs), this needs to be implemented by the user - for example, this is required when hhast-lint is running interactively: hhvm/hhast@92c989a
async output
This release:
- adds
OutputInterface::writeAsync(string): Awaitable<void>
that will write the complete provided buffer - adds
OutputInterface::rawWrite(string): int
, which returns the number of bytes written - adds
CLIBase::displayHelpAsync(OutputInterface): Awaitable<void>
to replaceCLIBase::displayHelp
OutputInterface::write()
and CLIBase::displayHelp()
are still present, but will be removed in a future release.
Support HHVM 3.28
This release:
- adds support for HHVM 3.28
Improving handling of `readLineAsync` when there is an fd event, but not a full ilne
This led to readLineAsync()
returning ''
when there was no actual input available, but not at EOF.
Fix FileHandlerInput::readLineAsync() when a line is already available
v1.1.0 blocks waiting for more data when it doesn't need more data. This affects reading from STDIN a line at a time.
Add Terminal encapsulation, and `InputInterface` for stdin
This release:
- adds
InputInterface
,StringInput
,FileHandleInput
, andCLIBase::getStdIn()
; these provide async read support, enabling automated testing of interactive programs - adds the
ITerminal
interface andTerminal
classes, providing access tosupportsColor()
,isInteractive()
, and standard input/output/error.CLIBase
still exposes these via convenience accessors, in addition togetTerminal()
Initial release
This is an initial release of CLILib, a high-level CLI library for Hack.
hh-clilib is derived from the original CLI code for HHAST, and is also in use in several other projects.