Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

invalidateResult

When file watching, prepares the step for being re-evaluated. Returns true if the step was newly invalidated, false if it was already invalidated.

Maker.invalidateResult
pub fn invalidateResult(maker: *Maker, step: *Step) bool

File

lib/compiler/Maker.zig:2838

Code

pub fn invalidateResult(maker: *Maker, step: *Step) bool {
    if (step.state == .precheck_done) return false;
    assert(step.pending_deps == 0);
    step.state = .precheck_done;
    step.reset(maker);
    for (step.dependants.items) |dependant_index| {
        const dependant = maker.stepByIndex(dependant_index);
        _ = invalidateResult(maker, dependant);
        dependant.pending_deps += 1;
    }
    return true;
}