1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00
flake-parts/modules
Robert Hensing 3a0408e3ac perSystem: Check that inputs'.<name> is a flake, for better error message
The alternative would have been to try and make this not an evaluation error,
but that would cause problems.

Idea: use filterAttrs to construct an attrset "inputFlakes". This would be
bad because it requires that we evaluate all inputs, just to see whether
they're flakes or not.

If Nix were to provide this metadata independently, which it could do
very efficiently, we still ought to wonder what's the purpose of
eliding those attributes. The only ways you'll encounter this
exception in `inputs'.<broken>` is by either
 - making a mistake, in which case the error message is great
 - or traversing all inputs, which nobody should do.

See https://flake.parts/best-practices-for-module-writing#do-not-traverse-inputs

Other idea: return *something empty*. This avoids the strictness
problem above, but still optimizes for the wrong use case.

Ultimately though, attribute transposition should not be needed at all,
but this project is largely dependent on the implicit schema imposed by Nix.
2024-01-11 12:46:03 +01:00
..
apps.nix remove unused code 2023-05-29 13:52:03 -04:00
checks.nix remove unused code 2023-05-29 13:52:03 -04:00
debug.nix remove unused code 2023-05-29 13:52:03 -04:00
devShells.nix docs: update to comments 2023-06-30 09:31:36 +02:00
flake.nix remove unused code 2023-05-29 13:52:03 -04:00
formatter.nix remove unused code 2023-05-29 13:52:03 -04:00
legacyPackages.nix remove unused code 2023-05-29 13:52:03 -04:00
moduleWithSystem.nix remove unused code 2023-05-29 13:52:03 -04:00
nixosConfigurations.nix remove unused code 2023-05-29 13:52:03 -04:00
nixosModules.nix Merge branch 'main' into moduleLocation 2023-07-22 18:07:20 -07:00
nixpkgs.nix perSystem: functionTo -> deferredModule 2022-05-25 18:18:50 +02:00
overlays.nix remove unused code 2023-05-29 13:52:03 -04:00
packages.nix remove unused code 2023-05-29 13:52:03 -04:00
perSystem.nix perSystem: Check that inputs'.<name> is a flake, for better error message 2024-01-11 12:46:03 +01:00
transposition.nix transposition: Improve perInput error message 2024-01-11 12:17:33 +01:00
withSystem.nix remove unused code 2023-05-29 13:52:03 -04:00