hundreds-father-404
02/06/2020, 3:46 PM./v2 test --debug src/python/pants/option/config_test.py --pytest-args="-k Config -vv"
aloof-angle-91616
02/06/2020, 3:47 PM./v2
?hundreds-father-404
02/06/2020, 3:48 PM./pants --no-v1 --v2
witty-crayon-22786
02/06/2020, 4:00 PMaloof-angle-91616
02/06/2020, 4:02 PM--run-args
as well as --
which confused mewitty-crayon-22786
02/06/2020, 4:05 PMhundreds-father-404
02/06/2020, 4:07 PM--
style but DWH and Benjy’s comments made me realize the benefits of consolidating around the option always living on a subsystem. https://docs.google.com/document/d/18-WFAYiktq3DAfOQPrnU5yaycT6V1K27yrnFPoGgTIA/edit?disco=AAAAD-H3BBQaloof-angle-91616
02/06/2020, 4:12 PMhundreds-father-404
02/06/2020, 4:19 PMSubsystem
or GoalSubsystem
i don’t think that precludes the trailing -- style when it’s unambiguousI do think it’s possible (albeit likely difficult to implement), but I argue that I don’t think it’s worth it. I responded in https://github.com/pantsbuild/pants/pull/9075#issuecomment-582982219 just now about
--run-args
and included in the last piece the possibility of maintaining traditional args for other goalsaloof-angle-91616
02/06/2020, 5:57 PMwitty-crayon-22786
02/06/2020, 5:58 PMaloof-angle-91616
02/06/2020, 6:01 PMwitty-crayon-22786
02/10/2020, 2:08 AM02:07:22 [WARN] /Users/stuhood/src/pants/src/python/pants/backend/python/tasks/pytest_run.py:587: DeprecationWarning: DEPRECATED: Using the old style of passthrough args for Pytest will be removed in version 1.26.0.dev1.
You passed arguments to Pytest through either the `--test-pytest-passthrough-args` option or the style `./pants test.pytest -- -k FooTest --quiet`. Instead, pass any arguments to Pytest like this: `./pants test :: --pytest-args='-k FooTest --quiet'`.
This change is meant to reduce confusion in how option scopes work with passthrough args and to prepare for Pytest eventually exclusively using the V2 implementation, which only supports `--pytest-args`.
return self._run_pytest(fail_fast, tuple(test_targets), workdirs)
hundreds-father-404
02/10/2020, 2:11 AMaloof-angle-91616
02/10/2020, 2:14 AMwitty-crayon-22786
02/10/2020, 2:15 AMtest.*
, and you can only use passthrough args when you're running an umambiguous set of targets, and ... that's ok)hundreds-father-404
02/10/2020, 2:16 AM—isort-args
so that you can pass when there is ambiguity. But I won’t die on this hill - so long as we do keep the explicit form alwaysbut. in practice, the unavoidable ambiguity is the same ambiguity that exists in v1, which hasn't caused an issueI don’t agree. I was very confused by task scopes when learning Pants at Foursquare; passthrough args were part of that. Even if it’s fine for pants users with experience, I find the traditional form difficult to teach new users because you must warn about all the special cases. Generally, we have two ways of doing things: an explicit form that always works and this traditional form that sometimes works / has a lot of special cases I found when teaching that special cases tripped up my students more than I’d expect. While it doesn’t perfectly map (new Pants users are not 7th graders learning to program for the first time), I since then have become suspicious of UX that involves special cases, particularly when we have an alternative that always works
witty-crayon-22786
02/10/2020, 2:23 AM./pants test $pyfile -- -k $method
works, because the passthrough args are applied to all tasks in all goals*aloof-angle-91616
02/10/2020, 2:29 AM