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.

setWatchInputsFromManifest

Step.setWatchInputsFromManifest
fn setWatchInputsFromManifest(s: *Step, maker: *Maker, man: *Cache.Manifest) !void

File

Code

fn setWatchInputsFromManifest(s: *Step, maker: *Maker, man: *Cache.Manifest) !void {
    const graph = maker.graph;
    const arena = graph.arena; // TODO don't leak into process arena
    const prefixes = man.cache.prefixes();
    clearWatchInputs(s, maker);
    for (man.files.keys()) |file| {
        // The file path data is freed when the cache manifest is cleaned up at the end of `make`.
        const sub_path = try arena.dupe(u8, file.prefixed_path.sub_path);
        try addWatchInputFromPath(s, maker, .{
            .root_dir = prefixes[file.prefixed_path.prefix],
            .sub_path = Dir.path.dirname(sub_path) orelse "",
        }, Dir.path.basename(sub_path));
    }
}