-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Open
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Description
For all lib.fileset functions taking file sets as arguments, it would be possible to implicitly coerce list types to the union of their elements. So e.g.
let
fs = lib.fileset;
in
fs.toSource {
root = ./.;
fileset = fs.difference
(fs.unions [
./Makefile
./src
])
(fs.unions [
./src/tests
./src/main.o
]);
}could be shortened to
let
fs = lib.fileset;
in
fs.toSource {
root = ./.;
fileset = fs.difference
[
./Makefile
./src
]
[
./src/tests
./src/main.o
];
}I did think of this while developing the library, but held back because I wasn't sure about the implications, especially regarding the duality of union and intersection.
But now that we decided against having a list version of intersection, it has become pretty clear that union is the one and only operation that would make sense to use by default for lists.
@alyssais would probably like this.
This issue is sponsored by Antithesis ✨
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
Status
No status