pub fn addFilePost(man: *Manifest, file_path: []const u8) !void man: *Manifestfile_path: []const u8988
989
990
991
992
993
994
995 pub fn addFilePost(man: *Manifest, file_path: []const u8) !void {
assert(man.manifest_file != null);
const gpa = man.cache.gpa;
const prefixed_path = try man.cache.findPrefix(file_path);
var keep = false;
defer if (!keep) gpa.free(prefixed_path.sub_path);
keep = try addPrefixedPathPost(man, prefixed_path);
}
Add a file as a dependency of process being cached, after the initial hash has been calculated.
This is useful for processes that don't know the all the files that are depended on ahead of time. For example, a source file that can import other files will need to be recompiled if the imported file is changed.