Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib.fileset.toList: init #288677

Merged
merged 1 commit into from Feb 26, 2024
Merged

lib.fileset.toList: init #288677

merged 1 commit into from Feb 26, 2024

Conversation

infinisil
Copy link
Member

@infinisil infinisil commented Feb 13, 2024

Description of changes

This adds lib.fileset.toList to turn a fileset into a list of its files as requested in #288592. See also this Discourse thread for the motivation.

This work is sponsored by Antithesis

Things done

  • Tidy code
  • Documentation
    • Mention strictness
  • Tests

Add a 👍 reaction to pull requests you find important.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-54/39990/1

@infinisil infinisil marked this pull request as ready for review February 26, 2024 17:20
@infinisil infinisil force-pushed the fileset.toList branch 2 times, most recently from 4658b55 to c5c908f Compare February 26, 2024 17:23
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs suggestions, and then LGTM!

lib/fileset/default.nix Outdated Show resolved Hide resolved
The resulting list of files can be turned back into a file set using [`lib.fileset.unions`](#function-library-lib.fileset.unions).

Type:
toList :: FileSet -> [ Path ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to ignore.

Suggested change
toList :: FileSet -> [ Path ]
lib.fileset.toList :: FileSet -> [ Path ]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'd like to keep it consistent with the other signatures, which is without the prefix.

@infinisil infinisil merged commit 4d11de3 into NixOS:master Feb 26, 2024
20 checks passed
@infinisil infinisil deleted the fileset.toList branch February 26, 2024 20:28
Copy link
Contributor

Successfully created backport PR for release-23.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants