an `@console_rule` can have a dependency on an `op...
# development
a
an
@console_rule
can have a dependency on an
optionable_rule()
h
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
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
Would that allow passthru syntax, or require using
—args
? My goal is to allow this
./pants test.pytest ... — -k test_foo
a
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
Okay. With some guidance, I’d love to work on passthru args. It’d be really helpful in porting to V2
a
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
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
yea, passthru would require some additional effort. temporarily putting the options on a subsystem would be reasonable workaround i think.