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.trace should show whether directories include files by default #268878

Open
infinisil opened this issue Nov 21, 2023 · 0 comments
Open
Labels
5. scope: tracked Issue (or PR) is linked back to a `5. scope: tracking` issue

Comments

@infinisil
Copy link
Member

Issue description

lib.fileset.trace should show whether directories include files by default.

Here's an example:

$ mkdir d d/d
$ touch f d/f d/d/f

$ nix repl -f channel:nixos-unstable
[...]

nix-repl> :a lib.fileset                                
Added 11 variables.

nix-repl> trace (difference ./. (difference ./d ./d/d))
trace: /home/tweagysil/test/x
trace: - d
trace:   - d (all files in directory)
trace: - f (regular)

The trace should instead be something like this:

trace: /home/tweagysil/test/x (includes files by default)
trace: - d (excludes files by default)
trace:   - d (all files in directory, includes files by default)
trace: - f (regular)

This is totally doable, just requires a bunch of time and might make everything slower (not just the tracing). So I'm not sure if this is worth having. For now just writing this down to track it.

This issue is sponsored by Antithesis

@samueldr samueldr added the 5. scope: tracked Issue (or PR) is linked back to a `5. scope: tracking` issue label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5. scope: tracked Issue (or PR) is linked back to a `5. scope: tracking` issue
Projects
None yet
Development

No branches or pull requests

2 participants