-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Extend function reflection #10350
Copy link
Copy link
Open
Labels
error-messagesConfusing messages and better diagnosticsConfusing messages and better diagnosticsfeatureFeature request or proposalFeature request or proposallanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etc
Metadata
Metadata
Assignees
Labels
error-messagesConfusing messages and better diagnosticsConfusing messages and better diagnosticsfeatureFeature request or proposalFeature request or proposallanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etc
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
⚖ To discuss
Is your feature request related to a problem? Please describe.
Function reflection is an important part of everyday use of the Nix language, in
callPackageand the module system, to improve syntax and to make strict functions lazy.However, the information is too limited, creating pitfalls that "library" code such as
callPackagecan not currently compensate.builtins.functionArgsHaveElipses#7317Furthermore, it prevents improvements to be made without breaking compatibility:
outPaththrough newmetaargument #8908Describe the solution you'd like
Two solutions have been already been proposed:
outPaththrough newmetaargument #8908They could hardly be more different. Open design questions:
arg,args,ellipsis,hasArgsbindsAllAttrs,args,isOpen,strictCurrently implemented by neither:
__functor.Describe alternatives you've considered
functionArgsthroughcallPackageand the module system.Additional context
Priorities
Add 👍 to issues you find important.