From 7c6bd8b25fd74559ce1d1b5cb59c7d3ac69c33cb Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 5 Feb 2024 12:33:58 -0800 Subject: [PATCH] Add release notes for "Functions are printed with more detail" (cherry picked from commit abb5fef355afc14819c96de08a3687c2257bd10c) --- doc/manual/src/release-notes/rl-2.20.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/manual/src/release-notes/rl-2.20.md b/doc/manual/src/release-notes/rl-2.20.md index 5152926e7..666d0b4db 100644 --- a/doc/manual/src/release-notes/rl-2.20.md +++ b/doc/manual/src/release-notes/rl-2.20.md @@ -167,6 +167,25 @@ error: expected a set but found an integer ``` + +- Functions are printed with more detail [#7145](https://github.com/NixOS/nix/issues/7145) [#9606](https://github.com/NixOS/nix/pull/9606) + + `nix repl`, `nix eval`, `builtins.trace`, and most other places values are + printed will now include function names and source location information: + + ``` + $ nix repl nixpkgs + nix-repl> builtins.map + «primop map» + + nix-repl> builtins.map lib.id + «partially applied primop map» + + nix-repl> builtins.trace lib.id "my-value" + trace: «lambda id @ /nix/store/8rrzq23h2zq7sv5l2vhw44kls5w0f654-source/lib/trivial.nix:26:5» + "my-value" + ``` + - Flake operations like `nix develop` will no longer fail when run in a Git repository where the `flake.lock` file is `.gitignore`d [#8854](https://github.com/NixOS/nix/issues/8854)