ee423f391d
- Use a recursive descent parser so that it's easy to extend. - Add `@args` to enable customizing command-line arguments - Add `@should-start` to enable `nix repl` tests that error before entering the REPL - Make sure to read all stdout output before comparing. This catches some extra output we were tossing out before! Change-Id: I5522555df4c313024ab15cd10f9f04e7293bda3a
41 lines
850 B
Text
41 lines
850 B
Text
@args --debugger
|
|
we enter a debugger via builtins.break in the input file.
|
|
|
|
info: breakpoint reached
|
|
|
|
causing another debugger even should not nest, but simply
|
|
print the error, skip the breakpoint, etc as appropriate.
|
|
|
|
nix-repl> "values show"
|
|
"values show"
|
|
|
|
nix-repl> builtins.break 2
|
|
2
|
|
|
|
nix-repl> builtins.throw "foo"
|
|
error:
|
|
… while calling the 'throw' builtin
|
|
at «string»:1:1:
|
|
1| builtins.throw "foo"
|
|
| ^
|
|
|
|
error: foo
|
|
|
|
nix-repl> assert false; 2
|
|
error: assertion 'false' failed
|
|
at «string»:1:1:
|
|
1| assert false; 2
|
|
| ^
|
|
|
|
exiting the debug frame should allow another to open.
|
|
|
|
nix-repl> :c
|
|
|
|
nix-repl> builtins.throw "bar"
|
|
error: bar
|
|
|
|
and once again, more breakpoints are ignored.
|
|
|
|
nix-repl> builtins.break 3
|
|
3
|
|
error: bar
|