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

aloof-angle-91616

05/14/2019, 2:13 AM
an
@console_rule
can have a dependency on an
optionable_rule()
h

hundreds-father-404

05/14/2019, 2:16 AM
Currently using
optionable_rule()
to consume subsystem options like
--python-setup-interpreter-constraints
Could this also be used to consume task options like
--test-pytest-chroot
?
I think the only way to consume task options is by defining them in the
Goal
class
a

aloof-angle-91616

05/14/2019, 2:36 AM
oh i absolutely would make
--args
an option for the
Test
goal
and please when you do make it a list option and use
pants.util.strutil.safe_shlex_split()
on each element
(imho)
h

hundreds-father-404

05/14/2019, 2:40 AM
Would that allow passthru syntax, or require using
—args
? My goal is to allow this
./pants test.pytest ... — -k test_foo
a

aloof-angle-91616

05/14/2019, 2:40 AM
well, it would be a way to get options to the pytest runner on the command line
i think you might need multiple changes to do that, but again, not as familiar with this as i could be
and maybe you could do this in the same change
piping in passthru args might not be hard
i'll look in the impl for
.passthru_args()
or whatever it is
👍 1
h

hundreds-father-404

05/14/2019, 2:42 AM
Okay. With some guidance, I’d love to work on passthru args. It’d be really helpful in porting to V2
a

aloof-angle-91616

05/14/2019, 2:43 AM
oh no, this should totally work
oh no nvm it'll work though
.get_passthru_args()
is what i was thinking of, in
task.py
👍 1
i think you could do subscoped options (unless that somehow already works, which would be radical) in one change, and passthru args in another
💯 1
but they probably touch ~the same code
also yeah with passthru args done like not sure how much more we need e.g. to support using the v2 pytest runner for all our python tests in our own CI?
i know we have more
just seems close
h

hundreds-father-404

05/14/2019, 2:54 AM
We’re very close to V2 for unit tests in CI, after my 3 PRs land! (They’re sequential) - support for source roots https://github.com/pantsbuild/pants/pull/7696 - then will push a fix to transitive deps - then will push a few fixes to get the util folder completely green. Have to set up the
env
differently. - then will test running against Travis to see if it’s green
💵 1
Review of that first PR would be awesome. It blocks everything else
w

witty-crayon-22786

05/14/2019, 3:42 AM
yea, passthru would require some additional effort. temporarily putting the options on a subsystem would be reasonable workaround i think.