diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-03-22 01:13:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-22 01:13:43 -0700 |
| commit | a2651cbc829d44df4c3773037598b30e8cf0c4da (patch) | |
| tree | 555c74b10683ae9678c68777310116f47142a8aa /src/Compilation.zig | |
| parent | 54c08579e4859673391843182aa2fd44aabbf6cf (diff) | |
| parent | 950359071bca707dbc9763f1bf3ebc79cd52ebca (diff) | |
| download | zig-a2651cbc829d44df4c3773037598b30e8cf0c4da.tar.gz zig-a2651cbc829d44df4c3773037598b30e8cf0c4da.zip | |
Merge pull request #19388 from ziglang/cache-dedup
cache system file deduplication
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 7a84848b80..2c047504e9 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1999,7 +1999,7 @@ pub fn update(comp: *Compilation, main_progress_node: *std.Progress.Node) !void const is_hit = man.hit() catch |err| { const i = man.failed_file_index orelse return err; - const pp = man.files.items[i].prefixed_path orelse return err; + const pp = man.files.keys()[i].prefixed_path; const prefix = man.cache.prefixes()[pp.prefix]; return comp.setMiscFailure( .check_whole_cache, @@ -4147,7 +4147,7 @@ pub fn cImport(comp: *Compilation, c_src: []const u8, owner_mod: *Package.Module const prev_hash_state = man.hash.peekBin(); const actual_hit = hit: { _ = try man.hit(); - if (man.files.items.len == 0) { + if (man.files.entries.len == 0) { man.unhit(prev_hash_state, 0); break :hit false; } |
