pub fn dependOnFileMetadata(b: *Build, lazy_path: LazyPath) void 2625
2626
2627
2628
2629
2630
2631
2632pub fn dependOnFileMetadata(b: *Build, lazy_path: LazyPath) void {
validateConfigureDependency(lazy_path);
const graph = b.graph;
graph.configure_dependencies.append(graph.arena, .{
.lazy_path = lazy_path.dupe(graph),
.mode = .metadata,
}) catch @panic("OOM");
}
Indicates that the build.zig logic depends on a particular file's size, inode, mtime, and contents.
If the file is created, deleted, has its contents changed, or the inode changes, or the mtime changes, the configure phase will be repeated.
This is an alternative to
Graph.poisonCachethat avoids making every invocation ofzig buildinto a cache miss.Only a subset of
LazyPathare supported:If the file would be inside one of the search prefixes, then the dependency cannot be tracked;
Graph.poisonCachemust be used instead.