NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.9k stars 1.53k forks source link

`builtins.filterAttrs` #11888

Open roberth opened 1 week ago

roberth commented 1 week ago

Is your feature request related to a problem? Please describe.

filterAttrs is called every time attrsOf produces a value, and it needs to, because of mkIf. Plenty of other usages exist.

Describe the solution you'd like

Add builtins.filterAttrs with the same behavior.

Side benefit: stack traces will be slightly shorter without losing info.

Describe alternatives you've considered

Additional context

Priorities

Add :+1: to issues you find important.