numtide / nix-filter

a small self-contained source filtering lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

matchExt never matches top-level files

DavHau opened this issue · comments

commented

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. setup filter:
nix-filter {
    # ...
    exclude = [
      (nix-filter.matchExt ".nix")
    ];
};
  1. add a new line to the flake.nix
  2. notice that a rebuilt of the package is triggered

Expected behavior
Adding a new line to the flake.nix should not trigger a re-build

System information

Additional context

Try without the . ;)

(nix-filter.matchExt "nix")

commented

Hm but with the . it still seems to match for files in sub-directories, in which case this would be an inconsistency.

commented

While making a minimal reproducer I noticed my assumption was wrong. (nix-filter.matchExt ".nix") does not filer anything at all.
Sorry for that.