diff options
| author | Will Fancher <elvishjerricco@gmail.com> | 2025-05-13 18:27:14 -0400 |
|---|---|---|
| committer | Will Fancher <elvishjerricco@gmail.com> | 2025-05-14 01:24:43 -0400 |
| commit | 26ccfb7a8cac9719fc4c96adb8fec8d565409543 (patch) | |
| tree | 91ea455db0a6f144514f421e6ad402e6b8255070 /pkgs/development/python-modules/httpserver | |
| parent | 4b0d1225f5e93e794800306d0785473e20129534 (diff) | |
nixos/image/repart: Use own assertions / warnings.
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.
Diffstat (limited to 'pkgs/development/python-modules/httpserver')
0 files changed, 0 insertions, 0 deletions
