Sigil 0.22.6

release

A reliability release for scripts, plus the groundwork for sigil env. Two defects let a program lose data or an error and still exit 0, and the command line swallowed -L arguments meant for other programs. All three are fixed, and several errors that named nothing now say what went wrong.

Download 0.22.6Get started

Existing projects build without changes. One behaviour change to know about: a guard that used to return #f for an error none of its clauses matched now passes the error on, so a script that seemed to succeed may now report it.

Strings with a NUL byte are written in full

write-file-string, the shell's write-text and display stopped at the first NUL byte and reported success. A script saving a downloaded archive could end up with a 24-byte file and exit 0. Every byte of a string is now written, to files, pipes and ports alike.

guard passes on an error that no clause matches

A guard with two or more clauses returned #f when none of them matched, so the error vanished and the script exited 0. It now propagates, as R7RS specifies.

Known issue: when the inner guard sits in tail position of an outer guard's body, the error it passes on skips the outer handler and reaches the top level. Until it's fixed, call the inner code in non-tail position, for example (let ((r (thunk))) r), or give the inner guard an else clause.

Arguments after -- reach your program

sigil treated -L as its own load-path flag wherever it appeared, even after --, so sigil env shell -- tmux -L work started tmux on the wrong server. Everything after -- now passes through untouched.

Errors that name what went wrong

Struct, record and multimethod errors printed placeholders like ~a: unknown field ~a; they now read like point: unknown field z. And when a module on a -L path stops sigil itself from starting, the error names the module, the file and the -L directory, and says to remove the -L or rebuild what it holds.

sigil env: one-time setup and a read-only store

sigil env setup offers to create the /sigil link that store programs need outside sigil env shell. It always asks first and refuses to run as root. The environment store now lives in ~/.local/share/sigil/store, apart from the build cache, and its items are read-only: sigil env store rm removes them and sigil env verify --full checks every file.

A lock with nothing to build now takes about 2 seconds instead of 12, and shows its progress as it goes. The first public channel follows once its signing is done.