| ... | ... | @@ -662,6 +662,9 @@ fn queueJobsForDeps(f: *Fetch) RunError!void { |
| 662 | 662 | // * path-based location is used without a hash. |
| 663 | 663 | // - Hash is added to the table based on the path alone before |
| 664 | 664 | // calling run(); no need to add it again. |
| 665 | // |
| 666 | // If we add a dep as lazy and then later try to add the same dep as eager, |
| 667 | // eagerness takes precedence and the existing entry is updated. |
| 665 | 668 | |
| 666 | 669 | for (dep_names, deps) |dep_name, dep| { |
| 667 | 670 | const new_fetch = &new_fetches[new_fetch_index]; |
| ... | ... | @@ -673,7 +676,12 @@ fn queueJobsForDeps(f: *Fetch) RunError!void { |
| 673 | 676 | const digest_len = @typeInfo(Manifest.MultiHashHexDigest).array.len; |
| 674 | 677 | const multihash_digest = h[0..digest_len].*; |
| 675 | 678 | const gop = f.job_queue.table.getOrPutAssumeCapacity(multihash_digest); |
| 676 | | if (gop.found_existing) continue; |
| 679 | if (gop.found_existing) { |
| 680 | if (!dep.lazy) { |
| 681 | gop.value_ptr.*.lazy_status = .eager; |
| 682 | } |
| 683 | continue; |
| 684 | } |
| 677 | 685 | gop.value_ptr.* = new_fetch; |
| 678 | 686 | break :h multihash_digest; |
| 679 | 687 | }, |
| ... | ... | @@ -684,7 +692,12 @@ fn queueJobsForDeps(f: *Fetch) RunError!void { |
| 684 | 692 | const new_root = try f.package_root.resolvePosix(parent_arena, rel_path); |
| 685 | 693 | const multihash_digest = relativePathDigest(new_root, cache_root); |
| 686 | 694 | const gop = f.job_queue.table.getOrPutAssumeCapacity(multihash_digest); |
| 687 | | if (gop.found_existing) continue; |
| 695 | if (gop.found_existing) { |
| 696 | if (!dep.lazy) { |
| 697 | gop.value_ptr.*.lazy_status = .eager; |
| 698 | } |
| 699 | continue; |
| 700 | } |
| 688 | 701 | gop.value_ptr.* = new_fetch; |
| 689 | 702 | break :l .{ .relative_path = new_root }; |
| 690 | 703 | }, |