Skip to content

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

@infinisil

Description

@infinisil

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions