https://pantsbuild.org/ logo
l

loud-laptop-17949

11/19/2021, 9:48 PM
Is there a reason that filter and list are different goals? It seems like filter is a superset of list functionality?
I ask because I want to make use of the new cli aliases feature, but all my useful ones require piping filter and list calls together
h

hundreds-father-404

11/19/2021, 10:08 PM
You're right that filter is a superset of list. There is technically the
list --documented
feature, but that's weird and can now be replaced probably by using the
peek
goal with JQ I think we could merge filter into list? Benefit is one fewer goals I suppose?
👍 1
l

loud-laptop-17949

11/20/2021, 12:01 AM
yeah
or maybe add the filter params to all relevant goals?
💯 1
./pants --filter-target-type=shell_sources fmt
rather than
./pants filter --filter-target-type=shell_sources | xargs ./pants fmt
h

hundreds-father-404

11/20/2021, 12:22 AM
Yeah that's probably a better approach!
c

curved-television-6568

11/20/2021, 8:56 AM
I was pondering what it would look like to support piping aliases into own runs.. something like
Copy code
[cli.alias]
cmd = “| filter
—target-type=… “ But wasn't sure how to use that in a useful way. Having the filter args support for all targets makes a lot more sense.
l

loud-laptop-17949

11/22/2021, 7:59 PM
yeah i would suggest trying to avoid piping there. git aliases support it though
👍 2
3 Views