-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Context
With sponsoring from Antithesis ✨, following the lib.path library, I've been able to work on lib.fileset in recent months, a new library in Nixpkgs to select local files to use for sources. Originally I opened a WIP PR as a proof-of-concept and to get feedback on the general design. Later I also created a Discourse post to gather more feedback. After not getting a lot of feedback though (but also nobody complaining), we (me, @roberth and @fricklerhandwerk) were content enough with its general design and therefore agreed to accept my PRs to incrementally build up the library in Nixpkgs.
So over the last months I made a bunch of PRs, and had them reviewed and merged by @roberth and @fricklerhandwerk. Today I'm happy to say that the library is very usable, check out its reference docs! It's not perfect, but the basic feature set is there and is tested thoroughly.
Originally I used the WIP PR to summarise the on-going work, but it would be better to have a dedicated tracking issue for this instead, so I'm creating this issue for that. Furthermore I'm going to use this issue to collect feature requests for the file set library.
Finished, ongoing and proposed interface changes
- File set combinators base:
lib.fileset.toSource#245623 lib.fileset.union,lib.fileset.unions: init #255025lib.fileset.trace,lib.fileset.traceVal: init #256417lib.fileset.intersection: init #257356lib.fileset.difference: init #259065lib.fileset.fileFilter: init #260265lib.fileset.fromSource: init #261732lib.fileset: Lazier path existence check #267091fileset.fileFilter: Restrict second argument to paths #267384lib.fileset.gitTracked: init #264891lib.fileset.maybeMissing: init #265964lib.fileset.fileFilter: Predicate attribute for file extension #266362lib.fileset.gitTrackedshould support out-of-tree builds #269283- Turn
lib.filesetinto a list of file paths #288592 lib.fileset: Implicitly coerce lists to unions #267387
Status: Unsure- Add
lib.fileset.optional :: Bool -> FileSet -> FileSet#266106
Status: Unsure lib.fileset.emptyfeature request #266366
Status: Unsurelib.fileset.traceshould show whether directories include files by default #268878
Status: Unsurelib.fileset.fileFiltershould allow filtering by file subpath/components #269504
Status: Unsurelib.filesetneeds something likelib.cleanSource#269517
Status: Unsurelib.filesetshould have a way to filter directories #271307
Status: Unsure
Indirectly related:
- Function for transforming store path contents #264541
Definitely out of scope for file set library
Status: Unsure - Add a way to control inclusion of empty directories in
builtins.pathresults nix#8820
This is a proposed addition to the Nix builtins to improve file set library performance.
Status: Unsure builtins.fetchGitdirty mode almost unusable in pure evaluation mode nix#9292
If you're trying to use the library but run into problems related to any of the above issues, please leave a comment there or 👍 it, especially if its status is unsure. And if you have a request for a new feature, please comment it here, ideally with an issue/PR!
Sub-issues
Metadata
Metadata
Assignees
Labels
Projects
Status