1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Print the value in error: cannot coerce messages

This extends the `error: cannot coerce a TYPE to a string` message
to print the value that could not be coerced. This helps with debugging
by making it easier to track down where the value is being produced
from, especially in errors with deep or unhelpful stack traces.
This commit is contained in:
Rebecca Turner 2023-12-06 12:42:53 -08:00
parent 5f72a97092
commit 83bb494a30
No known key found for this signature in database
10 changed files with 68 additions and 31 deletions

View file

@ -6,4 +6,4 @@ error:
| ^
10|
error: cannot coerce a set to a string
error: cannot coerce a set to a string: { a = { a = { a = { a = "ha"; b = "ha"; c = "ha"; d = "ha"; e = "ha"; f = "ha"; g = "ha"; h = "ha"; j = "ha"; }; «4294967295 attributes elided»}; «4294967294 attributes elided»}; «4294967293 attributes elided»}