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.

cacheHitWatched

Clears previous watch inputs, if any, and then populates watch inputs from the full set of files picked up by the cache manifest.

Must be accompanied with writeManifestAndWatch.

Step.cacheHitWatched
pub fn cacheHitWatched(s: *Step, maker: *Maker, man: *Cache.Manifest, parent_progress_node: std.Progress.Node) !bool

File

Code

pub fn cacheHitWatched(s: *Step, maker: *Maker, man: *Cache.Manifest, parent_progress_node: std.Progress.Node) !bool {
    const is_hit = man.hit(parent_progress_node) catch |err| return failWithCacheError(s, maker, man, err);
    s.result_cached = is_hit;
    // The above call to hit() populates the manifest with files, so in case of
    // a hit, we need to populate watch inputs.
    if (is_hit) try setWatchInputsFromManifest(s, maker, man);
    return is_hit;
}