Sigil 0.24.3
A fix and scripting release. Cold compiles are fast again: importing Tessera from an empty cache takes 37 seconds, down from 117 on 0.24.2. Scripts start several times faster because a direct script no longer initializes the whole CLI. Definitions inside when, if and the other conditionals now behave like definitions anywhere else in a body, programs handle a closed stdout correctly, and sigil deps install keeps the exact Git commits your lockfile pins. UEFI applications can check a Linux initrd's digest before handing it to the kernel.
Cold compiles are fast again
0.24.2 made a cold build much slower: every cacheable module paid for effect analysis nobody asked for, plus repeated proofs about facts that couldn't change the result. Ordinary cache publication now skips the optional analysis and only proves what a module actually uses.
Importing Tessera's session from an empty cache takes 37.1 seconds, against 117.1 on 0.24.2 and 55.1 on 0.24.1 (median of three). Warm starts are unchanged at about 0.93 seconds. A new guard in the test suite runs three cold/warm pairs, checks cache reuse and rejects unrequested effect analysis.
Faster script startup
Running a script directly (sigil script.sgl, or a #! line) no longer loads the CLI's build driver, project loader or optional commands before the script runs. A native script's median start went from 1,234 ms to 278 ms, and a development launcher's from 705 ms to 131 ms, measured on a busy machine at nice 10. A test checks that a hello-world script loads none of those modules.
Scripts that want a build should run ($ sigil build ...) or ($ sigil bundle ...), which goes through the CLI's whole build lifecycle. The build internals a script can import were never a supported build interface.
Definitions inside conditionals
A define inside a when, unless, if, cond or case body now works like one in a begin: it's hoisted to the enclosing body or library, and references earlier in that body see it. Local variables are given their storage before any assignment or closure captures them, so setting such a local or capturing it in a nested procedure no longer raises numeric type errors or GET_CELL / SET_CELL errors.
Closed and broken stdout
- A program whose stdout pipe closes, as in
sigil script.sgl | head, now stops quietly with SIGPIPE (status 141 in shells), the way other Unix tools do. - Any other stdout write or flush error prints a diagnostic and exits
- That includes an error while flushing pending output at exit; in that case Sigil flushes your other open files before it stops.
- A stdout that was closed before the program started (
>&-) discards output quietly and keeps the program's exit status. - On POSIX, closed standard descriptors 0 to 2 are pointed at
/dev/nullbefore any file opens, so a new file can't take over stdout by accident. - Error messages on stderr appear before the error from flushing stdout.
println and eprintln now write a whole line in one write. POSIX stdout stays line-buffered for terminals, files and pipes. Set SIGIL_STDOUT_BUFFERING=block before starting Sigil to opt into block buffering for throughput. Windows stdout is unbuffered by default, and terminals stay unbuffered.
Lockfiles keep their Git commits
sigil deps install now preserves the exact Git commit each dependency is pinned to in sigil.lock, repairs locks that are missing a commit, and checks that existing commit IDs are valid. Changed commit, tag and branch pins are honored, with the resolver's usual version-first precedence.
- A branch-pinned lock gains a
ref:field the first time you reinstall. - An older lock keeps its commit as long as that commit is on the requested branch.
- A lock that pinned a version plus a tag re-resolves once to record the version range instead of the tag, then stays put on later installs.
Verified initrd for UEFI Linux boot
(sigil uefi) adds prepare-linux-verified, which takes the expected SHA-256 of the kernel and the initrd. Sigil reads and hashes the initrd before returning the boot ticket, and hands the kernel exactly the bytes it checked. A verified ticket also refuses an initrd= option on the kernel command line, so the EFI stub can't load an unchecked initrd from the ESP instead. The existing three-argument prepare-linux is unchanged.
Scripting additions
retryin(sigil shell patterns), also in the scripting prelude, reruns a command that returns an outcome. It makes a bounded number of attempts with capped backoff, returns the final outcome with both output streams intact, and lets exceptions through.->listin(sigil list), also in the scripting prelude, turns a JSON array (or a vector) into a list forlength,mapandfor-each. It returns a list unchanged and raises on anything else, so a missing field (#f) fails loudly instead of counting as zero items.
Store integrity checks
(sigil store) integrity checks accept cached: #t to reuse verification receipts, and jobs: to hash items in parallel with the same results as a serial check. Existing calls still do a full hash in one worker. A receipt counts only when every file in the item is more than two seconds old. store-export-verified-transfer and store-admit-verified-transfer keep those fast checks when an item moves between machines as an archive. A rejected transfer stays closed, and archive validation is stricter.
Fixes
- A script that raised a symbol and didn't catch it could exit 0. It now exits 1 and names the symbol on stderr.
sigil <name>now treats every core and optional command name as a command, whether or not that optional command is installed, so a file of the same name in the current directory never runs in its place.- Error messages that quoted a native procedure name or a file name containing
%could garble it. Those names are now printed as written.
Existing projects build without changes, apart from the conditional definitions and stdout behavior above.