Function addDirectoryWatchInput [src]

Any changes inside the directory will trigger invalidation. See also addDirectoryWatchInputFromPath which takes a Build.Cache.Path instead. Paths derived from this directory should also be manually added via addDirectoryWatchInputFromPath if and only if this function returns true.

Prototype

pub fn addDirectoryWatchInput(step: *Step, lazy_directory: Build.LazyPath) Allocator.Error!bool

Parameters

step: *Steplazy_directory: Build.LazyPath

Source

pub fn addDirectoryWatchInput(step: *Step, lazy_directory: Build.LazyPath) Allocator.Error!bool { switch (lazy_directory) { .src_path => |src_path| try addDirectoryWatchInputFromBuilder(step, src_path.owner, src_path.sub_path), .dependency => |d| try addDirectoryWatchInputFromBuilder(step, d.dependency.builder, d.sub_path), .cwd_relative => |path_string| { try addDirectoryWatchInputFromPath(step, .{ .root_dir = .{ .path = null, .handle = std.fs.cwd(), }, .sub_path = path_string, }); }, // Nothing to watch because this dependency edge is modeled instead via `dependants`. .generated => return false, } return true; }