aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/rl-next/env-size-reduction.md7
-rw-r--r--doc/manual/rl-next/with-error-reporting.md31
2 files changed, 38 insertions, 0 deletions
diff --git a/doc/manual/rl-next/env-size-reduction.md b/doc/manual/rl-next/env-size-reduction.md
new file mode 100644
index 000000000..40a58bc28
--- /dev/null
+++ b/doc/manual/rl-next/env-size-reduction.md
@@ -0,0 +1,7 @@
+---
+synopsis: Reduce eval memory usage and wall time
+prs: 9658
+---
+
+Reduce the size of the `Env` struct used in the evaluator by a pointer, or 8 bytes on most modern machines.
+This reduces memory usage during eval by around 2% and wall time by around 3%.
diff --git a/doc/manual/rl-next/with-error-reporting.md b/doc/manual/rl-next/with-error-reporting.md
new file mode 100644
index 000000000..10b020956
--- /dev/null
+++ b/doc/manual/rl-next/with-error-reporting.md
@@ -0,0 +1,31 @@
+---
+synopsis: Better error reporting for `with` expressions
+prs: 9658
+---
+
+`with` expressions using non-attrset values to resolve variables are now reported with proper positions.
+
+Previously an incorrect `with` expression would report no position at all, making it hard to determine where the error originated:
+
+```
+nix-repl> with 1; a
+error:
+ … <borked>
+
+ at «none»:0: (source not available)
+
+ error: value is an integer while a set was expected
+```
+
+Now position information is preserved and reported as with most other errors:
+
+```
+nix-repl> with 1; a
+error:
+ … while evaluating the first subexpression of a with expression
+ at «string»:1:1:
+ 1| with 1; a
+ | ^
+
+ error: value is an integer while a set was expected
+```