| ... | ... | @@ -291,7 +291,7 @@ pub const CacheHash = struct { |
| 291 | 291 | return error.FileTooBig; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | | const contents = try self.allocator.alloc(u8, ch_file.stat.size); |
| 294 | const contents = try self.allocator.alloc(u8, @intCast(usize, ch_file.stat.size)); |
| 295 | 295 | errdefer self.allocator.free(contents); |
| 296 | 296 | |
| 297 | 297 | // Hash while reading from disk, to keep the contents in the cpu cache while |
| ... | ... | @@ -470,6 +470,10 @@ fn isProblematicTimestamp(fs_clock: i128) bool { |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | 472 | test "cache file and then recall it" { |
| 473 | if (std.Target.current.os.tag == .wasi) { |
| 474 | // https://github.com/ziglang/zig/issues/5437 |
| 475 | return error.SkipZigTest; |
| 476 | } |
| 473 | 477 | const cwd = fs.cwd(); |
| 474 | 478 | |
| 475 | 479 | const temp_file = "test.txt"; |
| ... | ... | @@ -530,6 +534,10 @@ test "give nonproblematic timestamp" { |
| 530 | 534 | } |
| 531 | 535 | |
| 532 | 536 | test "check that changing a file makes cache fail" { |
| 537 | if (std.Target.current.os.tag == .wasi) { |
| 538 | // https://github.com/ziglang/zig/issues/5437 |
| 539 | return error.SkipZigTest; |
| 540 | } |
| 533 | 541 | const cwd = fs.cwd(); |
| 534 | 542 | |
| 535 | 543 | const temp_file = "cache_hash_change_file_test.txt"; |
| ... | ... | @@ -590,6 +598,10 @@ test "check that changing a file makes cache fail" { |
| 590 | 598 | } |
| 591 | 599 | |
| 592 | 600 | test "no file inputs" { |
| 601 | if (std.Target.current.os.tag == .wasi) { |
| 602 | // https://github.com/ziglang/zig/issues/5437 |
| 603 | return error.SkipZigTest; |
| 604 | } |
| 593 | 605 | const cwd = fs.cwd(); |
| 594 | 606 | const temp_manifest_dir = "no_file_inputs_manifest_dir"; |
| 595 | 607 | defer cwd.deleteTree(temp_manifest_dir) catch unreachable; |
| ... | ... | @@ -621,6 +633,10 @@ test "no file inputs" { |
| 621 | 633 | } |
| 622 | 634 | |
| 623 | 635 | test "CacheHashes with files added after initial hash work" { |
| 636 | if (std.Target.current.os.tag == .wasi) { |
| 637 | // https://github.com/ziglang/zig/issues/5437 |
| 638 | return error.SkipZigTest; |
| 639 | } |
| 624 | 640 | const cwd = fs.cwd(); |
| 625 | 641 | |
| 626 | 642 | const temp_file1 = "cache_hash_post_file_test1.txt"; |