hundreds-father-404
05/11/2020, 8:19 PM--pants-ignore
doesn’t seem as flexible as gitignore syntax. Is that known? In the example Python repo, these all fail to properly ignore `.pid`:
* --pants-ignore='/.pids'
* --pants-ignore='.pids/'
* --pants-ignore='.pids'
* --pants-ignore='./.pids/*'
You have to use:
* --pants-ignore='.pids/*'
* --pants-ignore='/.pids/*'
(Running ./pants --pants-ignore='..' cloc '**
)hundreds-breakfast-49010
05/11/2020, 8:21 PMhundreds-father-404
05/11/2020, 8:22 PM/.pids/*
instead of /.pids
, so it would be great to fixhundreds-breakfast-49010
05/11/2020, 8:33 PMhundreds-father-404
05/11/2020, 8:33 PM.
has something to do with this. I tried to reproduce with this and can’t:
$ mkdir demo; echo 'print("hello world")\n' > demo/f.py
$ ./pants --pants-ignore='/demo' cloc demo/f.py
$ ./pants --pants-ignore='/demo/*' cloc demo/f.py
It always behaves correctly.demo/f.py
is ignoredwitty-crayon-22786
05/11/2020, 8:38 PM.pids
is intentionally includedhundreds-father-404
05/11/2020, 8:38 PMERROR: Failed to scan directory "/Users/eric/DocsLocal/code/projects/example-python/.pids/watchman": Expected File, Dir or Link, but ".pids/watchman/watchman.sock" (relative to "/Users/eric/DocsLocal/code/projects/example-python") was a FileType(FileType { mode: 49152 })
witty-crayon-22786
05/11/2020, 8:38 PMhundreds-father-404
05/11/2020, 8:39 PM./pants cloc '**'
in the example repowitty-crayon-22786
05/11/2020, 8:40 PMhundreds-father-404
05/11/2020, 8:40 PMNo matter what I do, .demo/f.py is ignoredThis is because of the default ignore of hidden files. Okay.
witty-crayon-22786
05/11/2020, 8:41 PMhundreds-father-404
05/11/2020, 8:41 PM--pants-ignore
is in fact behaving properly. Sorry for the false flaghundreds-breakfast-49010
05/11/2020, 8:43 PM.pids
directory is special-cased with @witty-crayon-22786’s recent change, before the gitignore-processing code?witty-crayon-22786
05/11/2020, 8:43 PMworks:
['.*/', .., '!/.pids']
doesn't work:
['.*/', .., '!/.pids/pantsd']
hundreds-father-404
05/11/2020, 9:00 PMwitty-crayon-22786
05/11/2020, 11:22 PMIt is not possible to re-include a file if a parent directory of that file is excluded.https://git-scm.com/docs/gitignore
hundreds-father-404
05/11/2020, 11:23 PM.pids
in favor of something new. The issue would be having two folders at the same timewitty-crayon-22786
05/11/2020, 11:25 PMhundreds-father-404
05/11/2020, 11:45 PMwitty-crayon-22786
05/12/2020, 12:00 AM