nixpkgs-architecture / simple-package-paths

Nix RFC draft for auto-calling packages in nixpkgs
18 stars 1 forks source link

Don't `readDir` #7

Closed roberth closed 1 year ago

roberth commented 1 year ago

The proposal suggests to use readDir to generate the attributes. This will reduce performance compared to a file that lists the directories. Note that the readDir can not be lazy, despite the sharding, because // is strict in both arguments.

The file tree flattening alone is already a worthwhile change, and the readDir solution can be applied later, when we can actually measure it.

roberth commented 1 year ago

We can go back or forth on this decision without much trouble, so I'll agree with whatever decision is made.