Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Check

The check subcommand validates the pipeline structure without executing it.

CLI usage

$ my_app check
Pipeline is valid.

If validation fails:

$ my_app check
Error: Pipeline validation failed:
  - Node 'process' requires dataset 0x7f8a..., which is produced by a later node

What it validates

check calls StepInfo::check() on the pipeline, which verifies:

  • Sequential ordering — no node reads a dataset produced by a later node
  • No duplicate outputs — each dataset is produced by at most one node
  • Params are read-only — no node writes to a Param
  • Pipeline contractsPipeline declared inputs/outputs match children

See Check for the full list of CheckError variants.

Programmatic use

You can call check() directly on any StepInfo:

let steps = pipeline(&catalog, &params);
match steps.check() {
    Ok(()) => println!("Valid!"),
    Err(e) => eprintln!("Error: {e}"),
}

Or via App::dispatch, which calls check() when the command is Command::Check:

App::new(catalog, params)
    .with_command(Command::Check)
    .dispatch(pipeline)?;