Skip to main content

Module explanation

Module explanation 

Source
Expand description

The contents of explanations: why a step ran, or that it was cached, as a build decided it (“Explaining decisions”).

The step-position records hold a Verdict for each step of a task’s most recent run, so kizz why can print the reasons stored by the most recent build. A Reason is one of the kinds the spec lists:

  • never run: there is no record for this step;
  • the task program changed: its block, or a named loaded module;
  • the arguments changed: old and new, word by word;
  • the environment changed: the variables added, removed, or changed, with their values, which only --verbose shows;
  • the working directory, stdin, capture mode, ignore patterns, track patterns, timestamps, or machine changed;
  • inputs changed: every changed path, what changed about it, and who last wrote it;
  • the machine state that the step names changed: each changed value, old and new;
  • the command is marked always;
  • its task is marked cache=never;
  • kizz run --no-cache was given;
  • the previous run could not be cached, and why.

Every type here is encoded by the rules of “Step keys”: definite lengths, fields in a fixed order, and paths as byte strings.

Structs§

BuildId
The identity of one build: when it started, in nanoseconds since the Unix epoch, made larger than every earlier build of the same process. One process at a time uses a cache, so later builds have larger identities.
ChangedInput
One changed input: the path, what changed about it, and who last wrote it.
EnvChange
One environment variable that was added, removed, or changed.
Explanation
Why a step ran.
ModuleChange
One loaded module that changed.
TaskLabel
A task as explanations name it: its identity, the line of its block, and its heading.

Enums§

ModuleChangeKind
How a loaded module changed.
Reason
One reason a step ran.
SelfInflicted
Why a changed input is a self-inflicted reason to run: kizz’s own build changes it on every build.
Verdict
What a build decided about one step.
Writer
Who last wrote a changed input.