[Nix#8671] nix-instantiate uses «repeated» instead of <CYCLE> when printing #133

Open
opened 2024-03-16 06:45:05 +00:00 by lix-bot · 0 comments
Member

Upstream-Issue: NixOS/nix#8671

Describe the bug

Not sure when this changed precisely, but seems like a pretty obvious mistake to me, maybe when the cycle detection code was improved?

> nix-instantiate --version
nix-instantiate (Nix) 2.15.1
> nix-instantiate --eval --strict -E 'let x = { inherit x; inherit (builtins) add; id = x: x; }; in x'
{ add = <PRIMOP>; id = <LAMBDA>; x = «repeated»; }
> nix-instantiate --version
nix-instantiate (Nix) 2.3.16
> nix-instantiate --eval --strict -E 'let x = { inherit x; inherit (builtins) add; id = x: x; }; in x'
{ add = <PRIMOP>; id = <LAMBDA>; x = { add = <PRIMOP>; id = <LAMBDA>; x = <CYCLE>; }; }

(The change in cycle detection is a bit unfortunate for some use cases, but I think the change is good overall, as it's an obvious improvement.)

Expected behavior

Should use <CYCLE>, matching <PRIMOP> and <LAMBDA> except in the repl of course

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/8671 **Describe the bug** Not sure when this changed precisely, but seems like a pretty obvious mistake to me, maybe when the cycle detection code was improved? ```console > nix-instantiate --version nix-instantiate (Nix) 2.15.1 > nix-instantiate --eval --strict -E 'let x = { inherit x; inherit (builtins) add; id = x: x; }; in x' { add = <PRIMOP>; id = <LAMBDA>; x = «repeated»; } > nix-instantiate --version nix-instantiate (Nix) 2.3.16 > nix-instantiate --eval --strict -E 'let x = { inherit x; inherit (builtins) add; id = x: x; }; in x' { add = <PRIMOP>; id = <LAMBDA>; x = { add = <PRIMOP>; id = <LAMBDA>; x = <CYCLE>; }; } ``` (The change in cycle detection is a bit unfortunate for some use cases, but I think the change is good overall, as it's an obvious improvement.) **Expected behavior** Should use `<CYCLE>`, matching `<PRIMOP>` and `<LAMBDA>` except in the repl of course
lix-bot added the
bug
imported
labels 2024-03-16 06:45:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#133
No description provided.