-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
tests/functional/repl_characterization/data/regression_9917.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let | ||
a = builtins.trace "before inner break" ( | ||
builtins.break { msg = "hello"; } | ||
); | ||
b = builtins.trace "before outer break" ( | ||
builtins.break a | ||
); | ||
in | ||
b |
14 changes: 14 additions & 0 deletions
14
tests/functional/repl_characterization/data/regression_9917.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
https://github.com/NixOS/nix/pull/9917 (Enter debugger more reliably in let expressions and function calls) | ||
|
||
This test ensures that continues don't skip opportunities to enter the debugger. | ||
trace: before outer break | ||
info: breakpoint reached | ||
|
||
nix-repl> :c | ||
trace: before inner break | ||
info: breakpoint reached | ||
|
||
nix-repl> :c | ||
|
||
nix-repl> msg | ||
"hello" |
5 changes: 5 additions & 0 deletions
5
tests/functional/repl_characterization/data/regression_9918.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
let | ||
r = []; | ||
x = builtins.throw r; | ||
in | ||
x |
16 changes: 16 additions & 0 deletions
16
tests/functional/repl_characterization/data/regression_9918.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error: | ||
… while evaluating the error message passed to builtin.throw | ||
|
||
error: cannot coerce a list to a string: [ ] | ||
|
||
We expect to be able to see locals like r in the debugger: | ||
|
||
nix-repl> r | ||
[ ] | ||
|
||
nix-repl> :env | ||
Env level 0 | ||
static: x r | ||
|
||
Env level 1 | ||
builtins true false null scopedImport import isNull break abort throw derivationStrict placeholder baseNameOf dirOf removeAttrs map toString fetchMercurial fetchTree fetchTarball fetchGit fromTOML derivation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters