Skip to main content

Module workflows

Module workflows 

Source
Expand description

Workflows: the recipes a person can run here, read from the workflow runner’s own structured description of them.

just --dump --dump-format json already answers every question worth asking about a recipe — its name, its doc comment, its [group(...)], its parameters, its dependencies, whether it is private, whether it asks before running. So nothing here parses a justfile. A second parser for a file its own tool can describe is a second source of truth that goes stale the first time the syntax grows.

The banner shows a handful of commands, and the one thing it must not do is carry a list of them: a hard-coded just test outlives the recipe it names. The rule instead is one sentence, and the justfile is what decides its outcome:

The entry point of a group is the public recipe whose name is the group’s name.

A group without such a recipe has no entry point and contributes nothing. Groups are offered in the order the justfile declares them, so moving a group up the file moves its command up the banner, and naming a recipe after its group is what publishes it. There is no metadata to invent, no annotation to remember, and no configuration file that can disagree with the justfile.

Constants§

GROUP_SOURCE
The command that orders the groups. --dump sorts recipes by name and reports no group order, so declaration order — the only order a person recognises — comes from here.
SOURCE
The command whose output is read. Named here so the snapshot’s provenance can quote it.
TIMEOUT
How long the runner may take. It reads one file and prints a document; a second is already pathological, and a snapshot is better without it than late.

Functions§

entrypoints
The entry point of each group: the public recipe whose name is the group’s name.
group_order
The groups in the order just --groups --unsorted printed them.
resolve
Read the catalogue by asking just about the repository at root.
workflows_of
Every public workflow of a just --dump --dump-format json document, sorted by name.