aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/rl-next/print-value-in-installable-flake-error.md
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-05-21 05:29:52 -0600
committerQyriad <qyriad@qyriad.me>2024-05-21 05:55:13 -0600
commit20981461d4a2a62c68f4bc7c4258473f7cd7d8e1 (patch)
tree0067ccf7f5ff99ae91cdb206eb2326cb9ab63caa /doc/manual/rl-next/print-value-in-installable-flake-error.md
parent3de77e6dbd88e84fd555e25f31a57959f8c28dd5 (diff)
print type and value in "flake attr is not a derivation" errors
This turns errors like: error: flake output attribute 'hydraJobs' is not a derivation or path into errors like: error: expected flake output attribute 'hydraJobs' to be a derivation or path but found a set: { binaryTarball = «thunk»; build = «thunk»; etc> } This change affects all InstallableFlake commands. Change-Id: I899757af418b6f98201006ec6ee13a448c07077c
Diffstat (limited to 'doc/manual/rl-next/print-value-in-installable-flake-error.md')
-rw-r--r--doc/manual/rl-next/print-value-in-installable-flake-error.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/manual/rl-next/print-value-in-installable-flake-error.md b/doc/manual/rl-next/print-value-in-installable-flake-error.md
new file mode 100644
index 000000000..ae23b4dda
--- /dev/null
+++ b/doc/manual/rl-next/print-value-in-installable-flake-error.md
@@ -0,0 +1,20 @@
+---
+synopsis: New-cli flake commands that expect derivations now print the failing value and its type
+credits: Qyriad
+category: Improvements
+cls: 1177
+---
+
+In errors like `flake output attribute 'legacyPackages.x86_64-linux.lib' is not a derivation or path`, the message now includes the failing value and type.
+
+Before:
+
+```
+ error: flake output attribute 'nixosConfigurations.yuki.config' is not a derivation or path
+````
+
+After:
+
+```
+ error: expected flake output attribute 'nixosConfigurations.yuki.config' to be a derivation or path but found a set: { appstream = «thunk»; assertions = «thunk»; boot = { bcache = «thunk»; binfmt = «thunk»; binfmtMiscRegistrations = «thunk»; blacklistedKernelModules = «thunk»; bootMount = «thunk»; bootspec = «thunk»; cleanTmpDir = «thunk»; consoleLogLevel = «thunk»; «43 attributes elided» }; «48 attributes elided» }
+```