witty-crayon-2278605/01/2020, 7:31 PM
(add adding a default value for
aloof-angle-9161605/01/2020, 7:31 PM
hundreds-father-40405/01/2020, 7:43 PM
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
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
would live. For now, it would talk about
is ported, that too. We talk about file args vs target args in https://pants.readme.io/docs/targets
aloof-angle-9161605/01/2020, 8:07 PM
witty-crayon-2278605/01/2020, 8:09 PM
I 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-9161605/01/2020, 8:10 PM
witty-crayon-2278605/01/2020, 8:10 PM
aloof-angle-9161605/01/2020, 8:10 PM
witty-crayon-2278605/01/2020, 8:42 PM
hundreds-father-40405/01/2020, 8:48 PM
more ergonomic. For example, we could get this down to 3 characters:
, which is an alias for
./pants -csh fmt
. Those 4 extra characters remove any possible ambiguity + allow us to add things like
. There’s also a grey area with the proposal for goals that expect no targets, like
. When I say
, 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-2278605/01/2020, 8:50 PM
with no other arguments to do, then that would be another thing.
happy-kitchen-8948205/01/2020, 8:51 PM
witty-crayon-2278605/01/2020, 8:52 PM
we started out with a flag, and eventually made it syntax, and that has been a huge win (yay @hundreds-father-404)
started out as a separate goal, and is now a flag like
used to be.
hundreds-father-40405/01/2020, 8:54 PM
if 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
. 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.”
witty-crayon-2278605/01/2020, 8:56 PM
, 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 long
hundreds-father-40405/01/2020, 8:58 PM
witty-crayon-2278605/01/2020, 8:59 PM
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.
./pants roots $target
hundreds-father-40405/01/2020, 9:00 PM
witty-crayon-2278605/01/2020, 9:00 PM
(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-40405/01/2020, 9:03 PM
currently we would error if you ran ./pants testWe no-op. There have been a few discussions about what it should do, like warning like
aloof-angle-9161605/01/2020, 9:03 PM
witty-crayon-2278605/01/2020, 9:05 PM
We 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.
hundreds-father-40405/01/2020, 9:12 PM
i 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-9161605/01/2020, 9:13 PM
i’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-2278605/01/2020, 9:13 PM
aloof-angle-9161605/04/2020, 3:09 AM