nix
nix copied to clipboard
Forbid nested debuggers
Motivation
The nested debugger behavior is extremely confusing as a user and challenging to maintain invariants for (see the disclaimers about its behavior we get to remove now). The debugger should more-or-less behave like the REPL.
Before:
$ nix eval --file test.nix --debugger
info: breakpoint reached
at «none»:0: (source not available)
Starting REPL to allow you to inspect the current state of the evaluator.
Welcome to Nix 2.18.1. Type :? for help.
nix-repl> builtins.throw "what"
error: what
Starting REPL to allow you to inspect the current state of the evaluator.
Welcome to Nix 2.18.1. Type :? for help.
nix-repl>
After:
$ nix eval --file test.nix --debugger
info: breakpoint reached
Starting REPL to allow you to inspect the current state of the evaluator.
Welcome to Nix 2.20.0pre20231222_dirty. Type :? for help.
nix-repl> builtins.throw "what"
error:
… while calling the 'throw' builtin
at «string»:1:1:
1| builtins.throw "what"
| ^
error: what
nix-repl>
Priorities and Process
Add :+1: to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.