https://pantsbuild.org/ logo
#development
Title
# development
a

aloof-angle-91616

03/10/2019, 2:40 AM
also the query pipeline is potentially going to be next level, i'm thinking something like:
Copy code
> ./pants --query='changes_since master' --query='filter type=junit_tests' --query='dependencies transitive=True' --query='filter type=jar_library' my-random-3rdparty-jar-task ::
🔥 1
h

hundreds-father-404

03/10/2019, 2:48 AM
That’s so cool! My biggest push will be for making this easy to discover how to do, e.g. good examples like this on our site + easy way in CLI to find all the options for
query
Definitely a fan of unifying our goals to as few as possible.
a

aloof-angle-91616

03/10/2019, 2:50 AM
yes, the reason i like having them all be v2 rules as well is so we have a consistent set of concepts that apply in code and on the command line
and like
--query
should have a generated help string i think with all the registered methods
h

hundreds-father-404

03/10/2019, 2:51 AM
What does that mean? I don’t follow why v2 would help here, as I’m not very familiar with v2
a

aloof-angle-91616

03/10/2019, 2:52 AM
right now
--owner-of
and
--changed-parent
and target specs on the command line are mutually exclusive, and then there are v1 tasks which will do things like
filter
and
dependees
and
paths
, and the difference between the options and the tasks is an exposed implementation detail
there's nothing specific that v2 rules get us except dependency injection
so
changes_since HEAD
gets converted to an
OwnersRequest
, which gets converted to
BuildFileAddresses
and
owner_of file/path.py
gets converted to an
OwnersRequest
as well, and we don't have to reimplement that part
so if someone wanted to add another method that highlights specific files which we want to find owners for
they can (in the code) write a rule to convert to an
OwnersRequest
and use the same configuration that other methods do
it's not like "this saves lives"
but more that v2 rules allow centralizing logic in the large and small and that makes implementation of things (and extension by plugin developers) easier, and it's less likely they'll need to resort to monolithic v1 tasks with their own config/etc
👌 1
which is what happens in the monorepo
and that bitrots
and having a 1:1 correspondence between objects that get passed between v2 rules and the different
--query
methods makes documentation easier
no really obvious wins except that it's so much easier for me to write at least