mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
![]() It was easy to accidentally trigger infinite recursion if you depended on `toplevel` in any way before. For instance, if you used `CopyBlocks` with an image containing `toplevel`. This was because `toplevel`'s assertion / warning logic has to be evaluated, but that means evaluating `image.repart`'s assertions / warnings, which requires evaluating the `repartConfig` attrsets to check for malformed `Label`s. That causes the module system to type check *all* `repartConfig` keys, even though most of them aren't used in the assertions / warnings. So evaluating `system.build.image` evaluates `repartConfig.CopyBlocks`, which evaluates `toplevel`, which evaluates assertions / warnings, which evaluates `repartConfig.CopyBlocks` to type check it. Infinite loop. Even ignoring this recursion problem, it's still better for the repart module to have its own assertions / warnings options. You don't have to use `toplevel` in a repart image, so its assertions / warnings would have been ignored in that case anyway. This way they're *always* checked when you build an image. |
||
---|---|---|
.. | ||
amend-repart-definitions.py | ||
assert_uki_repart_match.py | ||
file-options.nix | ||
images.nix | ||
repart-image.nix | ||
repart-verity-store.nix | ||
repart.nix |