setWatchInputsFromManifest
Function parameters
Parameters
- s:*Step
- man:*Build.Cache.Manifest
Type definitions in this namespace
Types
Functions in this namespace
Functions
- make
- If the Step's `make` function reports `error.MakeFailed`, it indicates they
- dump
- For debugging purposes, prints identifying information about this Step.
- evalZigProcess
- Assumes that argv contains `--listen=-` and that the process being spawned
- installFile
- Wrapper around `std.fs.Dir.updateFile` that handles verbose and error output.
- installDir
- Wrapper around `std.fs.Dir.makePathStatus` that handles verbose and error output.
- cacheHit
- Prefer `cacheHitAndWatch` unless you already added watch inputs
- cacheHitAndWatch
- Clears previous watch inputs, if any, and then populates watch inputs from
- writeManifest
- Prefer `writeManifestAndWatch` unless you already added watch inputs
- writeManifestAndWatch
- Clears previous watch inputs, if any, and then populates watch inputs from
- singleUnchangingWatchInput
- For steps that have a single input that never changes when re-running `make`.
- addWatchInput
- Places a *file* dependency on the path.
- addDirectoryWatchInput
- Any changes inside the directory will trigger invalidation.
- addDirectoryWatchInputFromPath
- Any changes inside the directory will trigger invalidation.
- reset
- Implementation detail of file watching and forced rebuilds.
- recursiveReset
- Implementation detail of file watching.
Source
Implementation
fn setWatchInputsFromManifest(s: *Step, man: *Build.Cache.Manifest) !void {
const arena = s.owner.allocator;
const prefixes = man.cache.prefixes();
clearWatchInputs(s);
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, .{
.root_dir = prefixes[file.prefixed_path.prefix],
.sub_path = std.fs.path.dirname(sub_path) orelse "",
}, std.fs.path.basename(sub_path));
}
}