https://pantsbuild.org/ logo
h

hundreds-father-404

05/19/2022, 12:36 AM
so I'm making progress on unifying our CLI specs for target-aware (
list
,
test
) and target-less goals (
tailor
,
count-loc
). But a big dilemma is
FilesystemIgnoreSpec
, e.g.
!foo.py
and
!*.py
. 🧵
1
I think its semantics are broken currently. Imo,
./pants test project/tests.py:tgt '!project/tests.py'
should result in no targets matched. But it doesn't! The ignore spec does nothing. In the design doc, I propose that we should have ignore options for every spec type, so you can do
dir:: '!dir/but_not_me::'
. That is consistent and powerful I think we need to do that as a holistic project for "ignore specs" tho. The status quo is broken
Trying to accomdate
FilesystemIgnoreSpec
is making this project really hard for me to reason about and implement So, I'm proposing that we simply remove the feature...it's incomplete and I expect not widely used. We never document it anywhere
and to clarify, current semantics == when you use a
FileLiteralSpec
or
FileGlobSpec
, the
FileIgnoreSpec
will filter out the file beforehand. It has no impact on
AddressSpecs
, which I think it should
b

bitter-ability-32190

05/19/2022, 12:42 AM
Yeah FWIW we have a lot of specs magic IMO that most people just dont use
(or at least I don't 😛 )
h

hundreds-father-404

05/19/2022, 12:43 AM
Totally: my dream is to rewrite our guide on specs to be super simple: • file • dir •
dir::
to recurse Regardless of the goal. For each of those, you can use
!
in front to negate We can have a tool tip w/ more advanced specs... •
'dir/*.ext'
(requires quotes) •
dir^
= dir + ancestors •
dir:
, which has less intuitive semantics than dir