Repository navigation
Fix: add check before recursing into inputs when pruning rec follows. - #35
Conversation
|
Reviewed after the merge. The fix is right. One case still overflows. It predates this PR. When two overrides follow each other and neither chain reaches # fixtures as in test-complex-cross-overrides-variant
{ nixpkgs = mkSrc "/our-nixpkgs";
nixpkgs3.follows = "common-dep/x";
common-dep.follows = "nixpkgs3/y";
test3.outPath = ./fixtures/with-inputs-project3; }
# error: stack overflow; max-call-depth exceededWith the same setup, the variant test's overrides give follows = seen: input:
isFollows inputs.${input}
&& (let followRoot = builtins.head (builtins.split "/" inputs.${input}.follows); in
followRoot == name
|| (inputs ? ${followRoot}
&& (if builtins.elem followRoot seen
then throw "with-inputs: follows cycle through ${followRoot}"
else follows (seen ++ [ input ]) followRoot)));
# ... builtins.filter (follows [ ]) (builtins.attrNames inputs)This is not blocking for #35. |
No description provided.