max / alloy
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
1 file changed,
+22 insertions,
-32 deletions
| @@ -438,10 +438,31 @@ | |||
| 438 | 438 | } | |
| 439 | 439 | ||
| 440 | 440 | /// Everything the builder decides. | |
| 441 | - | #[derive(Debug, Clone)] | |
| 441 | + | /// | |
| 442 | + | /// Derived `Default`, so every row's default is declared on its own enum and | |
| 443 | + | /// there is one place per choice rather than two that can disagree. The two | |
| 444 | + | /// that are not enums default to nothing, which is what "not set" means for | |
| 445 | + | /// both. | |
| 446 | + | #[derive(Debug, Clone, Default)] | |
| 442 | 447 | pub(crate) struct Choices { | |
| 443 | 448 | pub(crate) profile: Profile, | |
| 444 | 449 | pub(crate) browser: Browser, | |
| 450 | + | /// Toolchains, empty by default. | |
| 451 | + | /// | |
| 452 | + | /// The default is what the image itself requires (Max, 2026-08-17), and as | |
| 453 | + | /// of 2026-08-27 that is nothing: measured, the shipped image compiles | |
| 454 | + | /// nothing at runtime, since the `cargo install` that builds shop runs in a | |
| 455 | + | /// builder stage the final image is not built from. A toolchain that is | |
| 456 | + | /// merely useful is picked here, at mint time. | |
| 457 | + | /// | |
| 458 | + | /// Rust survived the first ruling on the claim that sandod refuses to | |
| 459 | + | /// compile anywhere but its configured host. That is an argument about a | |
| 460 | + | /// machine being a build host, not about the image working, and a build | |
| 461 | + | /// host is now a thing a mint asks for: fw13 and astra both take | |
| 462 | + | /// `LANGS=rust`. Go was in the default earlier still, under "the default is | |
| 463 | + | /// what compiles the shipped stack", which already stopped short of the C | |
| 464 | + | /// tier and so was two-thirds true. `ARG LANGS` in the Containerfile | |
| 465 | + | /// carries every one of those rulings. | |
| 445 | 466 | pub(crate) langs: BTreeSet<Lang>, | |
| 446 | 467 | pub(crate) hostname: String, | |
| 447 | 468 | /// Path to a public key on the building machine, not the key itself. | |
| @@ -457,37 +478,6 @@ | |||
| 457 | 478 | pub(crate) db: Db, | |
| 458 | 479 | } | |
| 459 | 480 | ||
| 460 | - | impl Default for Choices { | |
| 461 | - | fn default() -> Self { | |
| 462 | - | Self { | |
| 463 | - | profile: Profile::default(), | |
| 464 | - | browser: Browser::default(), | |
| 465 | - | // The default is what the image itself requires (Max, | |
| 466 | - | // 2026-08-17), and as of 2026-08-27 that is nothing: measured, the | |
| 467 | - | // shipped image compiles nothing at runtime, since the `cargo | |
| 468 | - | // install` that builds shop runs in a builder stage the final image | |
| 469 | - | // is not built from. A toolchain that is merely useful is picked | |
| 470 | - | // here, at mint time. | |
| 471 | - | // | |
| 472 | - | // Rust survived the first ruling on the claim that sandod refuses | |
| 473 | - | // to compile anywhere but its configured host. That is an argument | |
| 474 | - | // about a machine being a build host, not about the image working, | |
| 475 | - | // and a build host is now a thing a mint asks for: fw13 and astra | |
| 476 | - | // both take `LANGS=rust`. Go was in the default earlier still, | |
| 477 | - | // under "the default is what compiles the shipped stack", which | |
| 478 | - | // already stopped short of the C tier and so was two-thirds true. | |
| 479 | - | // `ARG LANGS` in the Containerfile carries every one of those | |
| 480 | - | // rulings. | |
| 481 | - | langs: BTreeSet::new(), | |
| 482 | - | hostname: String::new(), | |
| 483 | - | pubkey: String::new(), | |
| 484 | - | artifact: Artifact::default(), | |
| 485 | - | trim: Trim::default(), | |
| 486 | - | db: Db::default(), | |
| 487 | - | } | |
| 488 | - | } | |
| 489 | - | } | |
| 490 | - | ||
| 491 | 481 | impl Choices { | |
| 492 | 482 | /// The `--build-arg` pairs, in a fixed order so the displayed command is | |
| 493 | 483 | /// stable between frames and between runs. |