unionstd.Build.Step.Run.StdIo[src]

Fields

infer_from_args

Whether the Run step has side-effects will be determined by whether or not one of the args is an output file (added with addOutputFileArg). If the Run step is determined to have side-effects, this is the same as inherit. The step will fail if the subprocess crashes or returns a non-zero exit code.

inherit

Causes the Run step to be considered to have side-effects, and therefore always execute when it appears in the build graph. It also means that this step will obtain a global lock to prevent other steps from running in the meantime. The step will fail if the subprocess crashes or returns a non-zero exit code.

check: std.ArrayListUnmanaged(Check)

Causes the Run step to be considered to not have side-effects. The process will be re-executed if any of the input dependencies are modified. The exit code and standard I/O streams will be checked for certain conditions, and the step will succeed or fail based on these conditions. Note that an explicit check for exit code 0 needs to be added to this list if such a check is desirable.

zig_test

This Run step is running a zig unit test binary and will communicate extra metadata over the IPC protocol.

Source Code

Source code
pub const StdIo = union(enum) {
    /// Whether the Run step has side-effects will be determined by whether or not one
    /// of the args is an output file (added with `addOutputFileArg`).
    /// If the Run step is determined to have side-effects, this is the same as `inherit`.
    /// The step will fail if the subprocess crashes or returns a non-zero exit code.
    infer_from_args,
    /// Causes the Run step to be considered to have side-effects, and therefore
    /// always execute when it appears in the build graph.
    /// It also means that this step will obtain a global lock to prevent other
    /// steps from running in the meantime.
    /// The step will fail if the subprocess crashes or returns a non-zero exit code.
    inherit,
    /// Causes the Run step to be considered to *not* have side-effects. The
    /// process will be re-executed if any of the input dependencies are
    /// modified. The exit code and standard I/O streams will be checked for
    /// certain conditions, and the step will succeed or fail based on these
    /// conditions.
    /// Note that an explicit check for exit code 0 needs to be added to this
    /// list if such a check is desirable.
    check: std.ArrayListUnmanaged(Check),
    /// This Run step is running a zig unit test binary and will communicate
    /// extra metadata over the IPC protocol.
    zig_test,

    pub const Check = union(enum) {
        expect_stderr_exact: []const u8,
        expect_stderr_match: []const u8,
        expect_stdout_exact: []const u8,
        expect_stdout_match: []const u8,
        expect_term: std.process.Child.Term,
    };
}