| ... | @@ -149,14 +149,9 @@ pub const CacheHash = struct { | ... | @@ -149,14 +149,9 @@ pub const CacheHash = struct { |
| 149 | self.manifest_file = try self.manifest_dir.createFile(manifest_file_path, .{ .read = true, .truncate = false }); | 149 | self.manifest_file = try self.manifest_dir.createFile(manifest_file_path, .{ .read = true, .truncate = false }); |
| 150 | } | 150 | } |
| 151 | | 151 | |
| 152 | // create a buffer instead of using readAllAlloc | | |
| 153 | // See: https://github.com/ziglang/zig/issues/4656 | | |
| 154 | var file_buffer = try Buffer.initCapacity(self.alloc, 16 * 1024); | | |
| 155 | defer file_buffer.deinit(); | | |
| 156 | | | |
| 157 | // TODO: Figure out a good max value? | 152 | // TODO: Figure out a good max value? |
| 158 | try self.manifest_file.?.inStream().stream.readAllBuffer(&file_buffer, 16 * 1024); | 153 | const file_contents = try self.manifest_file.?.inStream().stream.readAllAlloc(self.alloc, 16 * 1024); |
| 159 | const file_contents = file_buffer.toSliceConst(); | 154 | defer self.alloc.free(file_contents); |
| 160 | | 155 | |
| 161 | const input_file_count = self.files.len; | 156 | const input_file_count = self.files.len; |
| 162 | var any_file_changed = false; | 157 | var any_file_changed = false; |