Stack traces include unhelpful frames by default #664

Open
opened 2025-02-10 23:55:25 +00:00 by rbt · 0 comments
Owner

Describe the bug

Stack traces highlight unhelpful frames by default. In the example below, --show-trace correctly points out the erroneous code, but the default error display hides it completely.

Maybe related to the "stack traces are filtered backwards" bug.

Steps To Reproduce

$ nix build -L --expr 'builtins.derivation { jacked = "${null}"; system = "aarch64-darwin"; name = "foo6"; builder = "/bin/sh"; args 
= ["-c" "> $out"]; }'                          
error:
       … while evaluating an expression to select 'drvPath' on it
         at «internal»:1:552:
       … while calling the 'derivationStrict' builtin
         at «internal»:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: cannot coerce null to a string: null

nix --version output

nix (Lix, like Nix) 2.91.0

## Describe the bug Stack traces highlight unhelpful frames by default. In the example below, `--show-trace` correctly points out the erroneous code, but the default error display hides it completely. Maybe related to the "stack traces are filtered backwards" bug. ## Steps To Reproduce ``` $ nix build -L --expr 'builtins.derivation { jacked = "${null}"; system = "aarch64-darwin"; name = "foo6"; builder = "/bin/sh"; args = ["-c" "> $out"]; }' error: … while evaluating an expression to select 'drvPath' on it at «internal»:1:552: … while calling the 'derivationStrict' builtin at «internal»:1:208: (stack trace truncated; use '--show-trace' to show the full trace) error: cannot coerce null to a string: null ``` ## `nix --version` output `nix (Lix, like Nix) 2.91.0`
jade added this to the Error reporting project 2025-02-10 23:57:33 +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#664
No description provided.