diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-08-11 19:44:02 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-09-24 20:01:19 -0700 |
| commit | ea169e6ccfa0792629bebaa64e9d41fb5dd2a594 (patch) | |
| tree | 8f418cf33603e69552e745ee42c0475677b7a61c /lib/std/Build/Cache.zig | |
| parent | b6930097ec5f0e79346d3a1725be56a2d1dcc568 (diff) | |
| download | zig-ea169e6ccfa0792629bebaa64e9d41fb5dd2a594.tar.gz zig-ea169e6ccfa0792629bebaa64e9d41fb5dd2a594.zip | |
std.Build.Cache: clarify parameter is sub path, not basename
Diffstat (limited to 'lib/std/Build/Cache.zig')
| -rw-r--r-- | lib/std/Build/Cache.zig | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/std/Build/Cache.zig b/lib/std/Build/Cache.zig index 80170e1752..14063001a2 100644 --- a/lib/std/Build/Cache.zig +++ b/lib/std/Build/Cache.zig @@ -459,9 +459,9 @@ pub const Manifest = struct { } } - pub fn addDepFile(self: *Manifest, dir: fs.Dir, dep_file_basename: []const u8) !void { + pub fn addDepFile(self: *Manifest, dir: fs.Dir, dep_file_sub_path: []const u8) !void { assert(self.manifest_file == null); - return self.addDepFileMaybePost(dir, dep_file_basename); + return self.addDepFileMaybePost(dir, dep_file_sub_path); } pub const HitError = error{ @@ -1049,14 +1049,14 @@ pub const Manifest = struct { self.hash.hasher.update(&new_file.bin_digest); } - pub fn addDepFilePost(self: *Manifest, dir: fs.Dir, dep_file_basename: []const u8) !void { + pub fn addDepFilePost(self: *Manifest, dir: fs.Dir, dep_file_sub_path: []const u8) !void { assert(self.manifest_file != null); - return self.addDepFileMaybePost(dir, dep_file_basename); + return self.addDepFileMaybePost(dir, dep_file_sub_path); } - fn addDepFileMaybePost(self: *Manifest, dir: fs.Dir, dep_file_basename: []const u8) !void { + fn addDepFileMaybePost(self: *Manifest, dir: fs.Dir, dep_file_sub_path: []const u8) !void { const gpa = self.cache.gpa; - const dep_file_contents = try dir.readFileAlloc(dep_file_basename, gpa, .limited(manifest_file_size_max)); + const dep_file_contents = try dir.readFileAlloc(dep_file_sub_path, gpa, .limited(manifest_file_size_max)); defer gpa.free(dep_file_contents); var error_buf: std.ArrayListUnmanaged(u8) = .empty; @@ -1083,7 +1083,7 @@ pub const Manifest = struct { }, else => |err| { try err.printError(gpa, &error_buf); - log.err("failed parsing {s}: {s}", .{ dep_file_basename, error_buf.items }); + log.err("failed parsing {s}: {s}", .{ dep_file_sub_path, error_buf.items }); return error.InvalidDepFile; }, } |
