File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,11 @@ pub const CacheHash = struct {
258
258
}
259
259
260
260
/// Add a file as a dependency of process being cached, after the initial hash has been
261
- /// calculated. Returns the contents of the file, allocated with the given allocator.
261
+ /// calculated. This is useful for processes that don't know the all the files that
262
+ /// are depended on ahead of time. For example, a source file that can import other files
263
+ /// will need to be recompiled if the imported file is changed.
264
+ ///
265
+ /// Returns the contents of the file, allocated with the given allocator.
262
266
pub fn addFilePostFetch (self : * @This (), otherAlloc : * mem .Allocator , file_path : []const u8 ) ! []u8 {
263
267
debug .assert (self .manifest_file != null );
264
268
@@ -269,7 +273,9 @@ pub const CacheHash = struct {
269
273
}
270
274
271
275
/// Add a file as a dependency of process being cached, after the initial hash has been
272
- /// calculated.
276
+ /// calculated. This is useful for processes that don't know the all the files that
277
+ /// are depended on ahead of time. For example, a source file that can import other files
278
+ /// will need to be recompiled if the imported file is changed.
273
279
pub fn addFilePost (self : * @This (), file_path : []const u8 ) ! void {
274
280
const contents = try self .addFilePostFetch (self .alloc , file_path );
275
281
self .alloc .free (contents );
You can’t perform that action at this time.
0 commit comments