Places a file dependency on the path.
pub fn addWatchInput(step: *Step, maker: *Maker, arena: Allocator, lazy_file: LazyPath) Allocator.Error!void
pub fn addWatchInput(step: *Step, maker: *Maker, arena: Allocator, lazy_file: LazyPath) Allocator.Error!void {
const conf = &maker.scanned_config.configuration;
switch (lazy_file) {
.source_path => |source_path| {
const sub_path = source_path.sub_path.slice(conf);
const pkg_path = try maker.packagePath(arena, source_path.owner, sub_path);
try addWatchInputPath(step, maker, pkg_path);
},
.relative => |relative| {
const resolved_path = try maker.relativePath(arena, relative);
try addWatchInputPath(step, maker, resolved_path);
},
// Nothing to watch because this dependency edge is modeled instead via `dependants`.
.generated => {},
}
}