Is there any way to get more structured output fr...
# general
l
Is there any way to get more structured output from commands like
dependees
? I am trying to get a map of dependees for a bunch of files and am either faced with running through a loop and calling dependees for each (slow) or using xargs to
./pants
and calling dependees once, losing track of which target the dependee came from. Ideally I could call
dependees
(and maybe other commands like it) once with a bunch of targets and get something like a json map of which target has which dependee.
w
using
./pants peek ::
will get you the adjacency list for all targets
l
I should have added that I want to filter those by type
w
like
./pants --filter-target-type=… peek ::
?
l
something like
./pants list ... | xargs ./pants dependees --filter-target-type=python_test
no I want to filter the dependees by type
w
got it.
l
basically "give me a list of python_source's which are not depended upon by a python_test"
best idea I have now is 1. get a list of python_source's 2. for each: list dependees (slow), filtering by target type and count
w
./pants peek ::
plus some pretty simple recursive code will get you something similar faster probably:
peek
also includes the type information
faster
from a performance perspective