Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

addFilePost

Public Function
std.Build.Cache.Manifest.addFilePost
pub fn addFilePost(man: *Manifest, file_path: []const u8) !void

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.

Params

File

Build/Cache.zig:988
988
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);
    }