Truly bad error message from dumping a derivation directly into builtins.readFile #639

Closed
opened 2025-01-22 19:50:20 +00:00 by jade · 2 comments
Owner
 » nix build --expr 'let foo = builtins.derivation { system = "aarch64-darwin"; name = "foo"; builder = "/bin/sh"; args = ["-c" "> $out"]; }; in builtins.readFile foo'
error:
       … while evaluating the attribute ''

       error: string '' has 0 entries in its context. It should only have exactly one entry

What even?! What is this doing? Is it doing some impressive CLI misparse or something?

``` » nix build --expr 'let foo = builtins.derivation { system = "aarch64-darwin"; name = "foo"; builder = "/bin/sh"; args = ["-c" "> $out"]; }; in builtins.readFile foo' error: … while evaluating the attribute '' error: string '' has 0 entries in its context. It should only have exactly one entry ``` What even?! What is this *doing*? Is it doing some impressive CLI misparse or something?
jade added this to the Error reporting project 2025-01-22 19:50:20 +00:00
jade changed title from Truly bad error message from setting post-build-hook to nonsense to Truly bad error message from dumping a derivation directly into builtins.readFile 2025-01-22 19:51:50 +00:00
Author
Owner

repros on cppnix 2.24, Lix 2.91. it's an old bug at least.

repros on cppnix 2.24, Lix 2.91. it's an old bug at least.
Author
Owner

oh, it's this one #74

oh, it's this one https://git.lix.systems/lix-project/lix/issues/74
jade closed this issue 2025-01-23 00:17:56 +00:00
Sign in to join this conversation.
No milestone
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#639
No description provided.