The drawback of builtins.functionArgs
is that when we write {lib, pkgs, ...}@args: { x = args.x}
, if the function is called by callPackage
or a similar mechanism that uses builtins.functionArgs
, we actually cannot retrieve the x
field as expected.
The difficulty in removing builtins.functionArgs
lies in the fact that this built-in function is heavy used by callPackage.
A possible solution is to add ...
at the end of the parameter list of the code for all packages, like {lib, pkgs, ...}: {}
, to avoid relying on builtins.functionArgs
. I’m not sure if this is feasible or what potential issues might arise, so I’m initiating this discussion.