Files
lix/doc/manual/rl-next/trivial-flakes.md
T
piegames 481fc30ae7 libexpr/flakes: Replace the AST checks with maxCallDepth = 0
Change-Id: I7130cc941b4b7432df76a3995d298edfb28e6a01
2026-05-06 17:22:19 +02:00

1.2 KiB

synopsis, cls, category, credits, issues
synopsis cls category credits issues
Changes to `flake.nix` validation
5523
Breaking Changes
piegames
Qyriad
horrors
gh#4945

Flakes try to keep their inputs and metadata "simple", to make sure no unbounded computation may happen when calling e.g. nix flake show. Those checks were haphazard, a maintenance burden, and also easily circumventable.

Lix has now replaced all the old checks by a simple rule: No function calls outside of outputs. This is easier to reason about than the previous set of inconsistent rules, and crucially now also allows syntax features that users felt like they should have worked in the past, like let bindings. However, some warts still remain for now: Some syntax constructs like -1 internally desugar to __sub 0 1, which is a function call and thus remains forbidden. This will be rectified as soon as the deprecation period of the respective anti-features has been completed.

This change is breaking in the sense that flakes which are written with the newly allowed language features will not evaluate with an older Lix version which still uses the old, more restrictive checks. Crucially, this also affects all transitive dependants of such Flakes.