authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-09-13 18:26:52-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-09-16 13:12:47-07:00
loge38052663ca729764c1de7d5f28794d4509d8b79
tree7af2b64601caf7eaf118ec158f30912196513cff
parent228178c151e078dc1bef38c2e20038cebe24a887

std.Build.Cache: fix writing digest to wrong place


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

lib/std/Build/Cache.zig+2-3
......@@ -914,9 +914,8 @@ pub const Manifest = struct {
914914 m.hash.hasher = hasher_init;
915915 m.hash.hasher.update(input_digest);
916916
917 for (m.files.keys(), 0..) |off, i| {
917 for (m.files.keys()) |off| {
918918 const file = off.get(contents);
919 log.warn("hashing {d} {s} = {x}", .{ i, off.path(contents), &file.digest });
920919 m.hash.hasher.update(&file.digest);
921920 }
922921 }
......@@ -1395,7 +1394,7 @@ pub const Manifest = struct {
13951394 switch (input_path.contents.unwrap()) {
13961395 .requested => {
13971396 const start = m.all_input_content.items.len;
1398 hashFileAppend(io, opened_file, &input_file.digest, &m.all_input_content, gpa) catch |err| switch (err) {
1397 hashFileAppend(io, opened_file, &disk_file.digest, &m.all_input_content, gpa) catch |err| switch (err) {
13991398 error.Canceled, error.OutOfMemory => |e| return e,
14001399 else => |e| return fail(&m.diagnostic, .{ .file_read = .{
14011400 .file_offset = file_off,