diff --git a/lib/compiler/Maker.zig b/lib/compiler/Maker.zig index 118bcffb8dcfcc6dab6f37dcbf6678b716344594..d0bea06e27c69d07ac220e41c1add40e3b38c2ff 100644 --- a/lib/compiler/Maker.zig +++ b/lib/compiler/Maker.zig @@ -1400,7 +1400,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig { if (config_man) |man| { if (.hit == try man.check(compile_prog_node)) { - const digest = man.final(); + const digest = man.hitDigestHex(); const path: Path = .{ .root_dir = graph.local_cache_root, .sub_path = try arena.print("c/{s}", .{&digest}), @@ -1512,7 +1512,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig { break :cp .{ config_tmp_path, null }; } else { const man = config_man.?; - const digest = man.final(); + const digest = man.missDigestHex(); const final_path: Path = .{ .root_dir = graph.local_cache_root, .sub_path = try arena.print("c/{s}", .{&digest}), diff --git a/lib/compiler/Maker/Step/ConfigHeader.zig b/lib/compiler/Maker/Step/ConfigHeader.zig index 4ea9444d25b0dc6995ecfc43a3901105ce087be9..a539e2463128445541037d2feab024faa673681f 100644 --- a/lib/compiler/Maker/Step/ConfigHeader.zig +++ b/lib/compiler/Maker/Step/ConfigHeader.zig @@ -137,7 +137,7 @@ pub fn make( man.hash.addBytes(output); if (try step.cacheHit(maker, &man, progress_node)) { - const digest = man.final(); + const digest = man.hitDigestHex(); maker.generatedPath(conf_ch.generated_dir).* = .{ .root_dir = cache_root, .sub_path = try Io.Dir.path.join(arena, &.{ "o", &digest }), @@ -145,7 +145,7 @@ pub fn make( return; } - const digest = man.final(); + const digest = man.missDigestHex(); // If output_path has directory parts, deal with them. Example: // output_dir is zig-cache/o/HASH diff --git a/lib/compiler/Maker/Step/ObjCopy.zig b/lib/compiler/Maker/Step/ObjCopy.zig index db045d5f51e46e080e080d4fa434cff40e6ce1cd..52e3f9c7d4f20e0dc9dcd6623b57e647b8a26ca2 100644 --- a/lib/compiler/Maker/Step/ObjCopy.zig +++ b/lib/compiler/Maker/Step/ObjCopy.zig @@ -48,7 +48,7 @@ pub fn make( if (try step.cacheHit(maker, &man, progress_node)) { // Cache hit, skip subprocess execution. - const digest = man.final(); + const digest = man.hitDigestHex(); maker.generatedPath(conf_oc.output_file).* = .{ .root_dir = cache_root, .sub_path = try Io.Dir.path.join(arena, &.{ "o", &digest, basename }), @@ -67,7 +67,7 @@ pub fn make( // We don't find out more input files while executing objcopy so we can // already obtain the digest and use it directly as the output path. - const digest = man.final(); + const digest = man.missDigestHex(); const dest_path: Path = .{ .root_dir = cache_root, .sub_path = try Io.Dir.path.join(arena, &.{ "o", &digest, basename }), diff --git a/lib/compiler/Maker/Step/Options.zig b/lib/compiler/Maker/Step/Options.zig index ef932c7dae0bbf38284d38eebd53f1f1997b7b2f..b9e676ef6542343afe8a018e3f3bdff240a18936 100644 --- a/lib/compiler/Maker/Step/Options.zig +++ b/lib/compiler/Maker/Step/Options.zig @@ -54,7 +54,7 @@ pub fn make( const basename = "options.zig"; if (try step.cacheHitWatched(maker, &man, progress_node)) { - const digest = man.final(); + const digest = man.hitDigestHex(); maker.generatedPath(conf_options.generated_file).* = .{ .root_dir = cache_root, .sub_path = try Io.Dir.path.join(arena, &.{ "o", &digest, basename }), @@ -63,7 +63,7 @@ pub fn make( return; } - const digest = man.final(); + const digest = man.missDigestHex(); const out_path: Cache.Path = .{ .root_dir = cache_root, .sub_path = try Io.Dir.path.join(arena, &.{ "o", &digest, basename }), diff --git a/lib/compiler/Maker/Step/Run.zig b/lib/compiler/Maker/Step/Run.zig index f8b58d215997479660975b7b15de0c92c4e625ac..2e750ccfb9f963ed8bb544a5d99af61bb45fb77a 100644 --- a/lib/compiler/Maker/Step/Run.zig +++ b/lib/compiler/Maker/Step/Run.zig @@ -261,7 +261,7 @@ pub fn make( if (!has_side_effects and try step.cacheHitWatched(maker, &man, progress_node)) { // Cache hit; skip running command. - const digest = man.final(); + const digest = man.hitDigestHex(); try populateGeneratedStdIo(maker, &conf_run, cache_root, &digest); try populateGeneratedPaths(maker, output_placeholders.items, cache_root, &digest); step.result_cached = true; @@ -270,7 +270,7 @@ pub fn make( if (!any_dep_files) { // We already know the final output paths; use them directly. - const digest = if (has_side_effects) man.hash.final() else man.final(); + const digest = if (has_side_effects) man.hash.final() else man.missDigestHex(); const output_dir_path = "o" ++ Dir.path.sep_str ++ &digest; try populateGeneratedStdIo(maker, &conf_run, cache_root, &digest); try populateGeneratedPathsCreateDirs(arena, run_index, maker, output_dir_path, output_placeholders.items, argv_list.items); @@ -308,7 +308,7 @@ pub fn make( } } - const digest = if (has_side_effects) man.hash.final() else man.final(); + const digest = if (has_side_effects) man.hash.final() else man.missDigestHex(); const any_output = output_placeholders.items.len > 0 or conf_run.captured_stdout.value != null or conf_run.captured_stderr.value != null; diff --git a/lib/compiler/Maker/Step/WriteFile.zig b/lib/compiler/Maker/Step/WriteFile.zig index 5f7bad0e44e7ce45fc04d30dd943a478db731690..6b142a02338315221f403397db090178b096ab1a 100644 --- a/lib/compiler/Maker/Step/WriteFile.zig +++ b/lib/compiler/Maker/Step/WriteFile.zig @@ -105,7 +105,7 @@ pub fn make( } if (try step.cacheHit(maker, &man, progress_node)) { - const digest = man.final(); + const digest = man.hitDigestHex(); maker.generatedPath(conf_wf.generated_directory).* = .{ .root_dir = cache_root, .sub_path = try Io.Dir.path.join(arena, &.{ "o", &digest }), @@ -114,7 +114,7 @@ pub fn make( return; } - const digest = man.final(); + const digest = man.missDigestHex(); const out_path: Path = .{ .root_dir = cache_root, .sub_path = try Io.Dir.path.join(arena, &.{ "o", &digest }),