authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-14 18:47:34-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-19 12:39:36-07:00
log9df1d1e5ed8d8f98f4794087e5dee5d2a1b0605e
tree8751462ad2b3659708bb0a260645b2be2d1cf000
parent65b8b8b27bb4671443403e3d88534c0238b3c940

std.Build.Cache: add some more doomed assertions


1 files changed, 3 insertions(+), 0 deletions(-)

lib/std/Build/Cache.zig+3
......@@ -951,6 +951,7 @@ pub const Manifest = struct {
951951 /// will need to be recompiled if the imported file is changed.
952952 pub fn addFilePostFetch(self: *Manifest, file_path: []const u8, max_file_size: usize) ![]const u8 {
953953 assert(self.manifest_file != null);
954 assert(!std.fs.path.isAbsolute(file_path));
954955
955956 const gpa = self.cache.gpa;
956957 const prefixed_path = try self.cache.findPrefix(file_path);
......@@ -1008,6 +1009,7 @@ pub const Manifest = struct {
10081009 /// whether or not `prefixed_path.sub_path` should be kept.
10091010 pub fn addPrefixedPathPost(man: *Manifest, prefixed_path: PrefixedPath) !bool {
10101011 assert(man.manifest_file != null);
1012 assert(!std.fs.path.isAbsolute(prefixed_path.sub_path));
10111013 const gpa = man.cache.gpa;
10121014
10131015 const gop = try man.files.getOrPutAdapted(gpa, prefixed_path, FilesAdapter{});
......@@ -1039,6 +1041,7 @@ pub const Manifest = struct {
10391041 stat: File.Stat,
10401042 ) !void {
10411043 assert(self.manifest_file != null);
1044 assert(!std.fs.path.isAbsolute(file_path));
10421045 const gpa = self.cache.gpa;
10431046
10441047 const prefixed_path = try self.cache.findPrefix(file_path);