Releases: hhvm/hsl-experimental
v4.108.0: support and require HHVM 4.108
This release supports and requires HHVM v4.108. HHVM v4.108 includes the HSL and HSL IO, so those are no longer present in this package.
v4.99.0: support and require HHVM 4.99
Removes all <<__Pure>> attributes, which are no longer supported (they have been replaced by contexts/capabilities).
v4.93.1: support HHVM 4.97
Removes all <<__Rx>> and related attributes, which are no longer supported as of HHVM 4.97 (they have been replaced by contexts/capabilities).
v4.93.0: support and require HHVM 4.93
Needed for coeffect/capability syntax
v4.77.0: rename readAsync/writeAsync
This release:
- still supports v4.76; the version number was updated given it contains a breaking change
- provides hhvm/hsl-io v0.3.0
- renames
readAsync()toreadAllowPartialSuccessAsync() - renames
writeAsync()towriteAllowPartialSuccessAsync()
These methods were renamed as the majority of existing callers assumed the behavior of readAllAsync() /writeAllAsync(), and as such were buggy depending on the behavior of the underlying native file descriptor and the amount of data being read/written.
In most cases, the correct fix is to replace calls to these functions with calls to readAllAsync() or writeAllAsync(); callers that depend on partial reads/writes (e.g. two-way communication over sockets/pipes, interactive CLIs) may wish to use the renamed functions, readUntilAsync(), readLineAsync(), or the write equivalents.
v4.76.1: bugfixes and performance improvements in readUntilAsync()
This release:
- fixes a bug where multibyte separators would not be recognized if they straddled a chunk boundary
- improves performance when the separator is not found in the first chunk, regardless of length of the separator
v4.76.0: bugfixes and internal improvements
This release:
- makes
readAllAsync()use a reasonable buffer size forread(), instead of using the specified limit - or 6GB (the maximum size of a string in HHVM) if no limit was specified. This memory would be released after the call to read, but could still have a large impact on peak memory usage. - removes the internal
_Private\_Network\CancelablePollerclass; this was used as a workaround for an HHVM bug that was fixed in HHVM 4.76
4.66: Add `OS\ttyname()`, `OS\isatty()`
This release also fixes a bug leading to an exception if a file is closed before a lock or temporary file is disposed.
4.58.1: add `OS\mkdtemp()`, `CloseableHandle::closeWhenDisposed()`
Example usage:
$dir = OS\mkdtemp('/tmp/foo.XXXXXX');- must end with at least 6 'X' characters, which will be used as placeholders. Any additional X's may remain as literal X's or be considered additional placeholders, depending on the platform libcusing $handle->closeWhenDisposed() { /* ... */ }
v4.58.0: HSL-IO v0.2: buffered readers, FDHandle, removal of write queuing, disposables, and PHP resource support
This release:
- increases the version number of the
hsl-iovirtual package to 0.2.0 - removes
CloseableHandle::closeAsync()- useclose()instead - adds convenience methods
readAllAsync(),readFixedSizeAsync(),writeAllAsync()toIO\ReadHandle - adds
IO\BufferedReaderclass, which implementsIO\ReadHandleand adds:linesIterator()- use asforeach ($reader->linesIterator() await as $line) {}readLineAsync()- prefer usinglinesIterator()where appropriatereadUntilAsync()readByteAsync()
- adds
IO\MemoryHandleclass O_CLOEXECis now implicitly set on all handles; this will not affect most users, but removes an observable difference when using CLI-server mode- Removed disposable interfaces; file/socket open functions now return the non-disposable interface.
- removed queuing system from
IO\WriteHandle, as it can not provide the guarantees that would intuitively be expected. In general, avoid concurrent writes to the same handle, or add a queue or lock for your higher-level operations instead of each individual IO operation. - PHP resource support in HSL IO has been removed; all native handles have been ported to
OS\FileDescriptor - Fixed a bug where non-blocking accepts would never resolve (fail) if the socket was already closed
- Added
OS\mkostemps(),OS\mkostemp(),OS\mkstemp(),OS\mkstemps();File\temporary_file()now uses these - Added
IO\FDHandleinterface for handles that are backed byOS\FileHandles; all native types now implement this interface - Removed UserSpaceHandle; check for the behavior you want instead, e.g.
OS\FileHandle - invalid arguments in HSL IO now consistently fail with
EINVAL, instead of a mix of different exceptionsEINVALis used for consistency regardless of when there error is raised by Hack code or by native functions