| ... | @@ -5213,6 +5213,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, | ... | @@ -5213,6 +5213,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, |
| 5213 | .path = fork.path, | 5213 | .path = fork.path, |
| 5214 | .manifest_ast = fork.manifest_ast, | 5214 | .manifest_ast = fork.manifest_ast, |
| 5215 | .manifest = fork.manifest, | 5215 | .manifest = fork.manifest, |
| | 5216 | .uses = 0, |
| 5216 | }, {}); | 5217 | }, {}); |
| 5217 | } | 5218 | } |
| 5218 | } | 5219 | } |
| ... | @@ -5279,6 +5280,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, | ... | @@ -5279,6 +5280,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, |
| 5279 | .recursive = true, | 5280 | .recursive = true, |
| 5280 | .debug_hash = false, | 5281 | .debug_hash = false, |
| 5281 | .unlazy_set = unlazy_set, | 5282 | .unlazy_set = unlazy_set, |
| | 5283 | .fork_set = fork_set, |
| 5282 | .mode = fetch_mode, | 5284 | .mode = fetch_mode, |
| 5283 | .prog_node = fetch_prog_node, | 5285 | .prog_node = fetch_prog_node, |
| 5284 | }; | 5286 | }; |
| ... | @@ -5344,6 +5346,26 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, | ... | @@ -5344,6 +5346,26 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, |
| 5344 | job_queue.group.async(io, Package.Fetch.workerRun, .{ &fetch, "root" }); | 5346 | job_queue.group.async(io, Package.Fetch.workerRun, .{ &fetch, "root" }); |
| 5345 | try job_queue.group.await(io); | 5347 | try job_queue.group.await(io); |
| 5346 | | 5348 | |
| | 5349 | { |
| | 5350 | // Ensure that forks were actually used. This is done |
| | 5351 | // before printing manifest errors because using a fork can |
| | 5352 | // prevent them. |
| | 5353 | var any_unused = false; |
| | 5354 | for (fork_set.keys()) |*fork| { |
| | 5355 | if (fork.uses == 0) { |
| | 5356 | std.log.err("fork {f} matched no {s} packages", .{ |
| | 5357 | fork.path, fork.manifest.name, |
| | 5358 | }); |
| | 5359 | any_unused = true; |
| | 5360 | } else { |
| | 5361 | std.log.info("fork {f} matched {d} {s} packages", .{ |
| | 5362 | fork.path, fork.uses, fork.manifest.name, |
| | 5363 | }); |
| | 5364 | } |
| | 5365 | } |
| | 5366 | if (any_unused) process.exit(1); |
| | 5367 | } |
| | 5368 | |
| 5347 | try job_queue.consolidateErrors(); | 5369 | try job_queue.consolidateErrors(); |
| 5348 | | 5370 | |
| 5349 | if (fetch.error_bundle.root_list.items.len > 0) { | 5371 | if (fetch.error_bundle.root_list.items.len > 0) { |