previously, `builtins.break` didn't force its argument, resulting in a value wrapped with `break` being opaque to most builtins if not also wrapped with `seq`. see [lix-project/lix#1165] for more details on what this can break. this tiny fix just adds a call to `forceValue` inside `prim_break`, but unfortunately this "breaks" a few existing tests because it changes the call stack; those tests' golden outputs have been adjusted without modifying their intended purpose. Fixes #1165 [lix-project/lix#1165]: https://git.lix.systems/lix-project/lix/issues/1165 Change-Id: I5fe4ee3ff28b38aaf924125b8978130812e58fef
72 lines
1.6 KiB
Plaintext
72 lines
1.6 KiB
Plaintext
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.
|
|
@args --debugger
|
|
trace: before outer break
|
|
info: breakpoint reached
|
|
|
|
nix-repl> :c
|
|
trace: before inner break
|
|
info: breakpoint reached
|
|
|
|
nix-repl> :bt
|
|
|
|
0: error: breakpoint reached
|
|
$TEST_DATA/regression_9917.nix:3:5
|
|
|
|
2| a = builtins.trace "before inner break" (
|
|
3| builtins.break { msg = "hello"; }
|
|
| ^
|
|
4| );
|
|
|
|
1: while calling a function
|
|
$TEST_DATA/regression_9917.nix:3:5
|
|
|
|
2| a = builtins.trace "before inner break" (
|
|
3| builtins.break { msg = "hello"; }
|
|
| ^
|
|
4| );
|
|
|
|
2: while calling a function
|
|
$TEST_DATA/regression_9917.nix:2:7
|
|
|
|
1| let
|
|
2| a = builtins.trace "before inner break" (
|
|
| ^
|
|
3| builtins.break { msg = "hello"; }
|
|
|
|
3: while calling a function
|
|
$TEST_DATA/regression_9917.nix:6:5
|
|
|
|
5| b = builtins.trace "before outer break" (
|
|
6| builtins.break a
|
|
| ^
|
|
7| );
|
|
|
|
4: while calling a function
|
|
$TEST_DATA/regression_9917.nix:5:7
|
|
|
|
4| );
|
|
5| b = builtins.trace "before outer break" (
|
|
| ^
|
|
6| builtins.break a
|
|
|
|
5: while evaluating a 'let' expression
|
|
$TEST_DATA/regression_9917.nix:1:1
|
|
|
|
1| let
|
|
| ^
|
|
2| a = builtins.trace "before inner break" (
|
|
|
|
6: while evaluating the file '$TEST_DATA/regression_9917.nix':
|
|
$TEST_DATA/regression_9917.nix:1:1
|
|
|
|
1| let
|
|
| ^
|
|
2| a = builtins.trace "before inner break" (
|
|
|
|
nix-repl> :c
|
|
|
|
nix-repl> msg
|
|
"hello"
|