@@ -1356,29 +1356,6 @@ std::optional<Refusal> stage_member(PackRun& run, GroupJob& g, MemberJob& m) {
13561356 return std::nullopt ;
13571357}
13581358
1359- // ─── The dispatch pass ───────────────────────────────────────────────
1360- //
1361- // A `role = "artifact"` action is a ninja edge, and the staged tree is
1362- // produced here, in C++, AFTER ninja has finished. So an artifact action
1363- // cannot depend on the staged tree in the pass that built it, and a
1364- // single-pass `--format <name>` is not expressible. Two passes are, and
1365- // every value this one needs was answered by the first:
1366- //
1367- // `ov` the overrides that produced the build above
1368- // `plan->stagingRoot` from make_plan, which resolved the triple
1369- // `opts.formatName` the request, already checked against the graph
1370- //
1371- // NOTHING IS RE-DERIVED, and that is the whole discipline of this block.
1372- // `stagingRoot` is a function of the package name, the version, the resolved
1373- // triple and the mode; the resolved triple is not known until a prepare has
1374- // run, so computing it a second time before prepare -- from the host triple,
1375- // say -- is the shape where two derivations of one value agree on every
1376- // machine the author has and disagree on one they do not.
1377- //
1378- // One pass serves every member of the group: each member has its own stage,
1379- // the programs act for the member they belong to (`BuildOverrides::
1380- // pack_stages`), and one ninja drive builds every member's edges.
1381-
13821359// Copy a provider's distributable `product` into `dir` under its own name, with
13831360// those of `beside` (outputs the product consumed) below the product's own
13841361// directory, at their places relative to it. Each destination is replaced, and
@@ -1404,6 +1381,28 @@ std::string copy_distributable(const std::filesystem::path& product,
14041381 return {};
14051382}
14061383
1384+ // ─── The dispatch pass ───────────────────────────────────────────────
1385+ //
1386+ // A `role = "artifact"` action is a ninja edge, and the staged tree is
1387+ // produced here, in C++, AFTER ninja has finished. So an artifact action
1388+ // cannot depend on the staged tree in the pass that built it, and a
1389+ // single-pass `--format <name>` is not expressible. Two passes are, and
1390+ // every value this one needs was answered by the first:
1391+ //
1392+ // `ov` the overrides that produced the build above
1393+ // `plan->stagingRoot` from make_plan, which resolved the triple
1394+ // `opts.formatName` the request, already checked against the graph
1395+ //
1396+ // NOTHING IS RE-DERIVED, and that is the whole discipline of this block.
1397+ // `stagingRoot` is a function of the package name, the version, the resolved
1398+ // triple and the mode; the resolved triple is not known until a prepare has
1399+ // run, so computing it a second time before prepare -- from the host triple,
1400+ // say -- is the shape where two derivations of one value agree on every
1401+ // machine the author has and disagree on one they do not.
1402+ //
1403+ // One pass serves every member of the group: each member has its own stage,
1404+ // the programs act for the member they belong to (`BuildOverrides::
1405+ // pack_stages`), and one ninja drive builds every member's edges.
14071406std::optional<Refusal> dispatch_group (PackRun& run, GroupJob& g, mcpp::build::Backend& be) {
14081407 // WHICH ARTIFACT ACTIONS THIS BUILD ALREADY HAD, before a format was
14091408 // requested. The dispatch below reports what the REQUEST introduced,
0 commit comments