Sigil 0.24.12

release

A concurrency and runtime release. Async tasks now return handles you can inspect, wait on and cancel, and read-line on a pipe no longer stops every other fiber while it waits for the rest of a line. The new (sigil advice) library wraps a procedure in a loaded module at runtime, the way Emacs advice does. This release also fixes a crash when printing record instances and lets portable Linux apps exit while a detached daemon such as gpg-agent keeps running.

Download 0.24.12Get started

Compatibility. The native ABI remains at 10. Existing projects build without changes. sigil build -T now refuses a build configuration for a different target; see the last section below.

Wrap module procedures at runtime

(sigil advice) lets you add before, after, or around advice to a procedure in a loaded module. Pass a procedure identifier, as in (advice-add! greet around: shout), or pass the module and binding names explicitly. Callers that use the procedure by name see the change immediately. Removing the last registration restores the original procedure.

Manage async tasks

go and scheduler-spawn return task handles for reading a task's state, result, or error and requesting cancellation. Canceling a waiting task raises a condition at the wait so the task can run its cleanup. The running task is available through current-task. Each task keeps its own current output port across yields and inherits the spawner's port by default.

Inside a task, with-async reuses the current scheduler and waits for the tasks spawned in its scope and their descendants before returning the body's values. A with-async evaluated inside eval-string-in-module uses a scheduler within the evaluation when the caller's scheduler is outside that evaluation. A wait that tries to suspend to the outer scheduler raises an async-eval-yield condition. await-readable-fds returns the same readiness pair on and off the scheduler.

Out-of-tree code that calls abort-to-prompt directly with async-prompt-tag bypasses cancellation delivery. Use the async wait procedures to let task-cancel! raise at the wait and run the task's cleanup.

Read lines from pipes without blocking other fibers

On POSIX, read-line on a subprocess pipe, or on standard input that is a pipe or socket, lets other fibers run while the producer pauses mid-line. Before, a program that wrote half a line and paused froze the whole process until it sent the newline.

Fixes and smaller changes

display and write no longer crash on a record instance. They print the record's type and stored fields, as in #<point x: 1 y: 2>, including records nested inside lists, vectors and dictionaries.

Portable Linux apps can now finish exiting while a detached system daemon such as gpg-agent keeps running. The launcher waits for bundled helpers that are already running, even if a detached daemon started them. A detached daemon that starts a bundled helper after shutdown leaves the helper without a cache lease. Repair or uninstall can remove files the helper still needs.

procedure-arity now reports the declared parameters of bytecode and native closures. It includes optional positional parameters, rest parameters, and required and optional keywords. Primitives keep their existing arity values. Rebuild previously compiled modules to see the declared formals of their extended lambdas.

App release manifests can now list a macOS command-line ZIP archive and an Android ARM64 static build. A macOS command archive must be ad-hoc signed on Apple silicon and not notarized; unsigned Intel commands stay supported.

sigil build -T now exits with status 1 unless the selected Zig configuration matches the requested target. Select a matching configuration with --config, such as --config windows-amd64 for -T windows-amd64.