| ... | @@ -291,7 +291,7 @@ pub const CacheHash = struct { | ... | @@ -291,7 +291,7 @@ pub const CacheHash = struct { |
| 291 | return error.FileTooBig; | 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 | errdefer self.allocator.free(contents); | 295 | errdefer self.allocator.free(contents); |
| 296 | | 296 | |
| 297 | // Hash while reading from disk, to keep the contents in the cpu cache while | 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,6 +470,10 @@ fn isProblematicTimestamp(fs_clock: i128) bool { |
| 470 | } | 470 | } |
| 471 | | 471 | |
| 472 | test "cache file and then recall it" { | 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 | const cwd = fs.cwd(); | 477 | const cwd = fs.cwd(); |
| 474 | | 478 | |
| 475 | const temp_file = "test.txt"; | 479 | const temp_file = "test.txt"; |
| ... | @@ -530,6 +534,10 @@ test "give nonproblematic timestamp" { | ... | @@ -530,6 +534,10 @@ test "give nonproblematic timestamp" { |
| 530 | } | 534 | } |
| 531 | | 535 | |
| 532 | test "check that changing a file makes cache fail" { | 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 | const cwd = fs.cwd(); | 541 | const cwd = fs.cwd(); |
| 534 | | 542 | |
| 535 | const temp_file = "cache_hash_change_file_test.txt"; | 543 | const temp_file = "cache_hash_change_file_test.txt"; |
| ... | @@ -590,6 +598,10 @@ test "check that changing a file makes cache fail" { | ... | @@ -590,6 +598,10 @@ test "check that changing a file makes cache fail" { |
| 590 | } | 598 | } |
| 591 | | 599 | |
| 592 | test "no file inputs" { | 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 | const cwd = fs.cwd(); | 605 | const cwd = fs.cwd(); |
| 594 | const temp_manifest_dir = "no_file_inputs_manifest_dir"; | 606 | const temp_manifest_dir = "no_file_inputs_manifest_dir"; |
| 595 | defer cwd.deleteTree(temp_manifest_dir) catch unreachable; | 607 | defer cwd.deleteTree(temp_manifest_dir) catch unreachable; |
| ... | @@ -621,6 +633,10 @@ test "no file inputs" { | ... | @@ -621,6 +633,10 @@ test "no file inputs" { |
| 621 | } | 633 | } |
| 622 | | 634 | |
| 623 | test "CacheHashes with files added after initial hash work" { | 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 | const cwd = fs.cwd(); | 640 | const cwd = fs.cwd(); |
| 625 | | 641 | |
| 626 | const temp_file1 = "cache_hash_post_file_test1.txt"; | 642 | const temp_file1 = "cache_hash_post_file_test1.txt"; |