«none»:0 in --debugger #198

Open
opened 2024-03-29 22:03:02 +00:00 by rbt · 0 comments
Owner

Describe the bug

A clear and concise description of what the bug is.

If you have a problem with a specific package or NixOS,
you probably want to file an issue at https://github.com/NixOS/nixpkgs/issues.

Steps To Reproduce

With throw.nix containing:

let
  foo = 1;
in
  builtins.throw "what"

Then:

$ nix build --file throw.nix --debugger
error: what

Lix 2.90.0 debugger
Type :? for help.
nix-repl> :bt

0: error: what
/Users/wiggles/nix-your-shell/throw.nix:4:3

     3| in
     4|   builtins.throw "what"
      |   ^
     5|

1: while calling a function
/Users/wiggles/nix-your-shell/throw.nix:4:3

     3| in
     4|   builtins.throw "what"
      |   ^
     5|

2: while evaluating a 'let' expression
«none»:0
3: while evaluating the file '/Users/wiggles/nix-your-shell/throw.nix':
«none»:0

Note that the source locations work fine without the let expression.

Expected behavior

It shows the correct files and line numbers.

## Describe the bug A clear and concise description of what the bug is. If you have a problem with a specific package or NixOS, you probably want to file an issue at https://github.com/NixOS/nixpkgs/issues. ## Steps To Reproduce With `throw.nix` containing: ```nix let foo = 1; in builtins.throw "what" ``` Then: ``` $ nix build --file throw.nix --debugger error: what Lix 2.90.0 debugger Type :? for help. nix-repl> :bt 0: error: what /Users/wiggles/nix-your-shell/throw.nix:4:3 3| in 4| builtins.throw "what" | ^ 5| 1: while calling a function /Users/wiggles/nix-your-shell/throw.nix:4:3 3| in 4| builtins.throw "what" | ^ 5| 2: while evaluating a 'let' expression «none»:0 3: while evaluating the file '/Users/wiggles/nix-your-shell/throw.nix': «none»:0 ``` Note that the source locations work fine without the `let` expression. ## Expected behavior It shows the correct files and line numbers.
rbt added the
bug
label 2024-03-29 22:03:02 +00:00
jade added the
Area/repl
label 2024-05-30 07:12:30 +00:00
jade added the
E/reproducible
label 2024-06-24 23:43:49 +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#198
No description provided.