zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 26cb72086a5cb34255cc7d1d7447dcc77367aa78 (tree)
parent a65bc8d0712d14580a7d1b8bfdd2d7beb4b247d5
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date:   Sun,  4 Feb 2024 03:46:11 +0100

Cache: fix logic for retrying cache hits

Fixes potentially #16149

Diffstat:
Mlib/std/Build/Cache.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/std/Build/Cache.zig b/lib/std/Build/Cache.zig @@ -482,11 +482,11 @@ pub const Manifest = struct { self.want_refresh_timestamp = true; - while (true) { + const input_file_count = self.files.items.len; + while (true) : (self.unhit(bin_digest, input_file_count)) { const file_contents = try self.manifest_file.?.reader().readAllAlloc(gpa, manifest_file_size_max); defer gpa.free(file_contents); - const input_file_count = self.files.items.len; var any_file_changed = false; var line_iter = mem.tokenizeScalar(u8, file_contents, '\n'); var idx: usize = 0;