lix/tests/functional/repl_characterization/data
alois31 81a0624d76
libexpr/print: pretty-print idempotently
When pretty-printing is enabled, previously an unforced thunk would trigger
indentation, even when it subsequently does not evaluate to a nested structure.
The resulting output looked inconsistent, and furthermore pretty-printing was
not idempotent (since pretty-printing the same value again, which is now fully
evaluated, will not trigger indentation).
When strict evaluation is enabled, force the item before inspecting its type,
so that it is properly known whether it contains a nested structure.
Furthermore, there is no need to cause indentation for unforced thunks, since
the very next operation will be printing them as `«thunk»`.

This is mostly a port of https://github.com/NixOS/nix/pull/11100 , but we only
force the item when it's going to be forced anyway due to strict
pretty-printing, and a new test was written since the REPL testing framework in
Lix is different.

Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
Change-Id: Ib7560fe531d09e05ca6b2037a523fe21a26d9d58
2024-07-18 18:41:28 +02:00
..
extra_data Add repl-overlays 2024-04-08 17:11:47 -07:00
basic.ast Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
basic.test Add pre-commit checks 2024-03-29 22:57:40 -07:00
basic_repl.test Implement a repl characterization test system 2024-03-15 12:31:16 -07:00
basic_tidied.ast Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
basic_tidied.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
errors.test Print top-level errors normally in nix repl 2024-04-09 08:34:40 -07:00
idempotent.test libexpr/print: pretty-print idempotently 2024-07-18 18:41:28 +02:00
no_nested_debuggers.nix Merge pull request #9920 from 9999years/forbid-nested-debuggers 2024-03-31 17:28:25 +00:00
no_nested_debuggers.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
regression_9917.nix Add regression tests for #9917, #9918 2024-03-15 12:31:16 -07:00
regression_9917.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
regression_9918.nix Add regression tests for #9917, #9918 2024-03-15 12:31:16 -07:00
regression_9918.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
regression_l145.nix libexpr: associate let exprs with the correct StaticEnv 2024-03-18 14:15:22 -07:00
regression_l145.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
repl_overlays.nix Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_compose.nix Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_compose.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_destructure_without_dotdotdot_errors.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_destructure_without_formals_ok.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_error.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_printing.test Merge pull request #10208 from 9999years/print-strings-directly 2024-04-07 19:10:43 -07:00
stack_vars.nix Test that :st does ... something 2024-03-15 12:31:16 -07:00
stack_vars.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00