| ... | ... | @@ -567,16 +567,18 @@ fn runResource( |
| 567 | 567 | if (declared_hash.isOld()) { |
| 568 | 568 | const actual_hex = Package.multiHashHexDigest(f.computed_hash.digest); |
| 569 | 569 | if (!std.mem.eql(u8, declared_hash.toSlice(), &actual_hex)) { |
| 570 | const declared = if (declared_hash.toSlice().len > 0) declared_hash.toSlice() else "<empty>"; |
| 570 | 571 | return f.fail(hash_tok, try eb.printString( |
| 571 | 572 | "hash mismatch: manifest declares {s} but the fetched package has {s}", |
| 572 | | .{ declared_hash.toSlice(), actual_hex }, |
| 573 | .{ declared, actual_hex }, |
| 573 | 574 | )); |
| 574 | 575 | } |
| 575 | 576 | } else { |
| 576 | 577 | if (!computed_package_hash.eql(&declared_hash)) { |
| 578 | const declared = if (declared_hash.toSlice().len > 0) declared_hash.toSlice() else "<empty>"; |
| 577 | 579 | return f.fail(hash_tok, try eb.printString( |
| 578 | 580 | "hash mismatch: manifest declares {s} but the fetched package has {s}", |
| 579 | | .{ declared_hash.toSlice(), computed_package_hash.toSlice() }, |
| 581 | .{ declared, computed_package_hash.toSlice() }, |
| 580 | 582 | )); |
| 581 | 583 | } |
| 582 | 584 | } |
| ... | ... | @@ -726,6 +728,7 @@ fn queueJobsForDeps(f: *Fetch) RunError!void { |
| 726 | 728 | .hash = h: { |
| 727 | 729 | const h = dep.hash orelse break :h null; |
| 728 | 730 | const pkg_hash: Package.Hash = .fromSlice(h); |
| 731 | if (h.len == 0) break :h pkg_hash; |
| 729 | 732 | const gop = f.job_queue.table.getOrPutAssumeCapacity(pkg_hash); |
| 730 | 733 | if (gop.found_existing) { |
| 731 | 734 | if (!dep.lazy) { |