Skip to content

Order Declaration

Leonard Ramminger edited this page Aug 9, 2026 · 1 revision

Order Declaration

order("configure", "compile")
order("compile", "test")

Declares that one step must finish before another starts within the same phase+scope execution group.

Syntax

order(before, after)
Argument Meaning
before Step name that runs first
after Step name that runs second

Both arguments are the step name field, not phase:scope labels (though names may contain colons if you choose).

Effect

Steps without an ordering constraint in the same phase+scope may run in parallel (same level).

order() creates a dependency edge: after waits until before completes.

order("a", "b")
order("a", "c")

  Level 0:  a
  Level 1:  b, c    (b and c parallel after a)

Automatic ordering from mutate

If two steps in the same phase+scope have overlapping mutate glob patterns, Beez infers ordering so they do not run in parallel on the same files.

You can still add explicit order() hints for steps without overlapping mutates.

Errors

Error Cause
cyclic step dependency order() forms a cycle
mutate conflict Conflicting mutate patterns cannot be ordered
step ordering failed Cycle or mutate conflict when the phase+scope runs

Load time does not validate that step names in order() exist. Hints that reference steps not in the current phase+scope group are ignored.

Declaration order

order() may appear before or after step() declarations in build.lua.

Examples

Linear pipeline:

order("configure:setup", "build:compile")
order("build:compile", "test:unit")

Fan-out after compile:

order("build:compile", "test:unit")
order("build:compile", "test:integration")
-- unit and integration can run in parallel after compile

Lint after format:

order("format", "lint")

Next steps

Clone this wiki locally