Skip to content

Commit

Permalink
lib/modules: Memoize functionArgs lookup
Browse files Browse the repository at this point in the history
This would also make specialArgs-lib.nix pass.
  • Loading branch information
roberth committed Jul 3, 2024
1 parent 0a0e37c commit 88a9a93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let
elem
filter
foldl'
functionArgs
getAttrFromPath
head
id
Expand Down Expand Up @@ -507,7 +508,7 @@ let
extraArgs = mapAttrs (name: _:
addErrorContext (context name)
(args.${name} or config._module.args.${name})
) (lib.functionArgs f);
) (functionArgs f);

# Note: we append in the opposite order such that we can add an error
# context on the explicit arguments of "args" too. This update
Expand Down

0 comments on commit 88a9a93

Please sign in to comment.