Skip to content

Guion 0.7.0

Latest

Choose a tag to compare

@rmichaelthomas rmichaelthomas released this 16 Nov 03:22
1bc2e92

Install: brew install rmichaelthomas/guion/guion, or curl -fsSL https://raw.githubusercontent.com/rmichaelthomas/guion/main/distribution/get-guion.sh | sh, or download an archive below and check its .sha256. macOS archives are signed and notarized; the Windows archive is not signed.

Additions only, plus the artifact format going from 75 to 76 (older artifacts still load; a program that uses together:, channels, background commands, try_parallel_map or core_count needs this runtime). Nothing is removed or re-signed.

  • Record constructors take fields by name: Box(height=2, width=1), or a mix with positional first, Box(1, height=2). An unknown or repeated field, too many positional arguments or a missing field is an error that names it. Workers(at_once=50, each_ms=5000, all_ms=30000) uses it.

  • Python calls inside a timed try_parallel_map item stop at the item's deadline (R_DEADLINE) instead of running to the bridge's own 15 s limit. The python-interop feature builds again: it had stopped compiling after values moved to shared pointers, and its tests are updated.

  • Fan-out is no longer capped by cores. The parallel_map worker limit defaults to 64 on every machine and [runtime] max_parallelism can raise it to 1024; going over says which line to change: error[R_PARALLEL_LIMIT]: worker limit 200 is above this project's limit of 64 and raise it in guion.toml: [runtime] max_parallelism = 200. try_parallel_map(list, f, Workers(at_once, each_ms, all_ms)) is parallel_map with a result per item and deadlines: an item past each_ms, or still running or not started when all_ms passes, is Err with R_DEADLINE, finished items keep their results, and a fault in one item stops no other. Blocking HTTP, command and socket calls inside an item wait no longer than the time left, deadlines need no [clock] grant, and a recording replays the same item timing out. together: blocks run work in the background and end all of it with the block: start(f, argument) begins a task, wait(task) and wait_within(task, ms) give Result[T, TaskError], a task not waited for is stopped when the block ends, tasks have exactly the parent's grants and shared budgets, and a task cannot leave its block (E_SCOPE_ESCAPE). Channels (channel(capacity), send, receive, close) are bounded queues between tasks, so a fast producer waits for a slow consumer; first_ready(tasks) and first_value(channels) (and _within forms, which need import "std:process") give Ready(index, value): which of several is ready first and its result, taken in one step, and a recording replays the same choices. Channels (channel(capacity), send, receive, close) are bounded queues between tasks, so a fast producer waits for a slow consumer; first_ready(tasks) and first_value(channels) (and _within forms, which need import "std:process") give Ready(index, value): which of several is ready first and its result, taken in one step, and a recording replays the same choices. std:process also starts commands in the background: start_process, process_line, process_write, process_close_input and process_wait. Each command runs in its own process group and is stopped, with everything it started, when its together: block ends, when the program ends or when guion is interrupted. std:process gains core_count() for work that keeps the processor busy, and the HTTP client's internal thread pool follows the limit (up to 64) instead of stopping at 8.

  • Denials say how to fix themselves. A denied clock, environment variable, command, HTTP host or socket names the guion.toml line and the run flag that would allow it. guion run --json carries diagnostic.grant (table, key, value, flag) on the error and a denials array that also lists denials a program handled itself. Error codes are unchanged.

  • guion inspect --grants [--json] compares the hosts, commands, sockets, environment names and clock use the code can reach with what guion.toml grants, and lists each missing grant as a manifest entry and a flag. Targets computed while running are reported as such.

  • guion run asks one plain question before the run when a person is at the terminal and a grant is missing: [y] this run, [a] always (adds the exact entries to guion.toml, keeping comments and order), [N] no. The answer is read from the terminal itself, never from piped input, and nothing is asked under CI, GUION_NO_PROMPT, --no-prompt, --json, --sealed, --replay, guion test, or without a terminal. A target only known while running is asked about by name at that point. guion repl follows the same rules; a yes lasts the session. A recording's header lists the grants that came from a question.

  • temp: is a private folder for each run and each test, under TMPDIR, removed when the run ends (--keep-temp keeps it). --sealed runs with no file access and none of the project's grants.

  • Fixed: guion repl placed its permission flags after the file name, where run read them as program arguments.