witty-crayon-22786
05/01/2020, 7:31 PM--changed
(add adding a default value for --changed-parent
presumably)aloof-angle-91616
05/01/2020, 7:31 PMhundreds-father-404
05/01/2020, 7:43 PM--changed-since
is very interesting, though. And maybe we give it a short flag name since it’s such a common idiom.
Related: where should information on using --changed
since live in the new docs? https://pants.readme.io/docs/welcome-to-pants
I’m thinking we want a dedicated page on something like “advanced target selection”. This is where --query
would live. For now, it would talk about --changed
. Once filter
is ported, that too.
We talk about file args vs target args in https://pants.readme.io/docs/targetsaloof-angle-91616
05/01/2020, 8:07 PMwitty-crayon-22786
05/01/2020, 8:09 PMI don’t think that’s a great idea because it’s surprising and not discoverable.so, i think that it’s potentially very discoverable as long as it explains what it is doing (in a log message maybe). because i expect that a lot of folks end up running the bare goals before learning about targets
aloof-angle-91616
05/01/2020, 8:10 PMwitty-crayon-22786
05/01/2020, 8:10 PMaloof-angle-91616
05/01/2020, 8:10 PMwitty-crayon-22786
05/01/2020, 8:42 PMhundreds-father-404
05/01/2020, 8:48 PM--changed-since
more ergonomic. For example, we could get this down to 3 characters: ./pants -csh fmt
, which is an alias for --changed-since=HEAD
. Those 4 extra characters remove any possible ambiguity + allow us to add things like -csm
for --changed-since=master
.
There’s also a grey area with the proposal for goals that expect no targets, like ./pants roots
and ./pants target-types
. When I say ./pants roots
, is it operating on the changed targets? Or it takes no arguments? Without prior knowledge or documentation, you lose the ability to reason about this.witty-crayon-22786
05/01/2020, 8:50 PM./pants test
with no other arguments to do, then that would be another thing.happy-kitchen-89482
05/01/2020, 8:51 PMwitty-crayon-22786
05/01/2020, 8:52 PM--owner-of
we started out with a flag, and eventually made it syntax, and that has been a huge win (yay @hundreds-father-404)--changed
started out as a separate goal, and is now a flag like --owner-of
used to be.hundreds-father-404
05/01/2020, 8:54 PMif we can think of something else that we would eventually want ./pants test with no other arguments to do, then that would be another thing.That something else == consistent behavior with goals which take no arguments, like
roots
and target-types
. Regardless of the goal, no arguments means no arguments.
Please scan the docs section on goal arguments (revised yesterday): https://pants.readme.io/docs/goals#goal-arguments. I’m concerned the impact this would have on teaching Pants to new users, especially the day-to-day users who are not in this Slack / not the Pants administrator. That section of the docs would become confusing if “sometimes no arguments means --changed-since=master but sometimes goals take no arguments so no arguments mean no arguments.”--changed-since
more ergonomic)witty-crayon-22786
05/01/2020, 8:56 PMhelp
, i think there are a few goals that are inherent and informational, and we should be careful about biasing toward their ease of use when compared to the things that folks use all day longhundreds-father-404
05/01/2020, 8:58 PMwitty-crayon-22786
05/01/2020, 8:59 PM./pants roots $target
should fail fast saying it doesn’t accept a target it would not be odd for not providing a target to not trigger changed behavior there.hundreds-father-404
05/01/2020, 9:00 PMwitty-crayon-22786
05/01/2020, 9:00 PMctrl+c
to cancel thing here: https://pantsbuild.slack.com/archives/C0D7TNJHL/p1588365756459600?thread_ts=1588361479.454400&cid=C0D7TNJHL./pants test
(i hope?)… doing something other than erroring feels like it helps with discoverability… as long as it is very vocal about what it is doing.hundreds-father-404
05/01/2020, 9:03 PMcurrently we would error if you ran ./pants testWe no-op. There have been a few discussions about what it should do, like warning like
list
does.aloof-angle-91616
05/01/2020, 9:03 PMwitty-crayon-22786
05/01/2020, 9:05 PMWe no-op. There have been a few discussions about what it should do, like warning likemm. i would agree that it would be important for this to do something consistent across all goals that take files/targets.does.list
hundreds-father-404
05/01/2020, 9:12 PMi would agree that it would be important for this to do something consistent across all goals that take files/targets.Very strongly agreed.
aloof-angle-91616
05/01/2020, 9:13 PMi’m not sure how workunits are related… should maybe start a new thread for that.it's about pants output and options that redirect it to specific places. we can use this to make the choice of where to display output a user choice instead of a required convention
witty-crayon-22786
05/01/2020, 9:13 PMaloof-angle-91616
05/04/2020, 3:09 AM