Expand description
Running one task by its name, for kizz run (“Running one task with
kizz run”).
select_by_name finds the task named by kizz run <name> among the tasks
discovered under the current directory: the task whose kizz.md is the fewest
directory levels below the current directory wins (task_level), two tasks of
that name at the same level are an error that lists each with its path, and a
name that no task has is an error that lists the task names under the current
directory. A task’s level is counted along the path that discovery reports its
kizz.md under, the first path of a file reached through several.
run runs the selected task once, with its arguments in task.args and an
empty task.selected (TaskInfo::for_run): no other task runs, and no pass
follows, even when its program changes a file. It uses and updates the cache as
a build does, and stores what a build of that one task in one pass stores. The
engine options say whether every command runs (--no-cache, see
Engine::with_no_cache) and echoes its output live
(Engine::with_echo_every_step), and the StepEvents follow each step as it
starts or comes from the cache.
With Engine::with_report (kizz run --output), the run also keeps what its
observation report needs (RunObservations): the command of each step that
the run reached, in order, a step that ran with its process tree and a cache hit
as cached, and the task program’s own file accesses, its module reads included,
with their outcomes, which the tracer’s error-name query names.
RunReport::observation_report builds the report from them, each command the
root of its own process tree and the task program an entry of its own. Without
the option, nothing more is kept.
Structs§
- RunObservations
- What one
kizz runobserved for its observation report, which it keeps only when the engine writes one (Engine::with_report). - RunReport
- What one
kizz rundid.
Enums§
- Name
Error - Why
kizz run <name>selects no task.
Functions§
- run
- Run
task, made withTaskInfo::for_run, once withengine, askizz rundoes;calleris the caller environment, the lines its program prints go toprint, andeventsfollows each step as it starts or comes from the cache. - select_
by_ name - The task of
tasks, the tasks discovered under one directory in the default order, thatkizz run <name>runs: the task namednamewhosekizz.mdis the fewest directory levels below that directory. - task_
level - The number of directory levels between the directory discovery started in and
the
kizz.mdoftask: 0 for akizz.mdin that directory, 1 for one in a subdirectory, and so on, counted along the path that discovery reports it under.