Sigil 0.22.15
A bug-fix release for closures and long-running programs. Capturing a conditional internal definition no longer breaks a closure, pipe readers keep moving on Linux static builds and Android, and short file reads no longer leave the garbage collector's allocation totals growing.
Conditional definitions and closures
An internal define inside when, unless, if, or cond could fail with "GET_CELL: expected upvalue cell" when a lambda captured its binding. The binding now gets its cell before either branch runs, and redefining it updates the same cell so existing closures see the new value. Initializers still run only when their branch runs.
The sigil/lint tool now warns about this pattern. It works, but an explicit let binding or a definition before the conditional is easier to follow.
Fixes
- Pipe readers on Linux static builds and Android could stall after reading one byte while more bytes waited in libc's buffer. Inherited stdin and subprocess stdout and stderr now stay readable until all available bytes have been read, even when the writer waits for a reply.
- Short file reads could inflate GC allocation accounting and make long-running programs keep using more memory. Bytevectors are now accounted for by the bytes actually read.
- Repeatedly adding the same library search path no longer consumes another slot. Adding it again still moves it to the front, so lookup priority stays the same.