`--changed-since` seems to exist on `lint` and `ch...
# general
r
--changed-since
seems to exist on
lint
and
check
goals but not
fmt
. How about adding this? Shall I open a feature request on GitHub?
1
Now I'm configuring a git pre-push hook that runs
./pants fmt lint check --changed-since=$(git merge-base main HEAD)
, but it seems that...
fmt
does not have this option.
b
That flag is not implemented on any goal, and is it's own subsystem. That way it works with every goal which expects specs. What makes it seem that fmt isn't being run?
w
If you want to see which files are passed to those goals, you should be able to run something like:
./pants --changed-since=origin/main list
r
ah... that's my mistake
--changed-since main
-> not working
--changed-since=main
-> working (even with
fmt
)
👀 1
without the equal sign, it says:
image.png
b
Can you file a ticket? At the very least we could provide a hint ("did you forget an equal sign?")
c
yeah, pants requires all option values to be provided on the cli using the
--option=value
syntax.
r
i think if this is the intended design, it's fine but just adding a note to the documentation would be good
👍 2
c
I think it is slightly unfortunate that we’ve a bespoke cli library, rather than using something like `click`… (I do see the history here, and the pain it would be to adapt to someone else’s idea of how things ought to work…)
1
b
Click is reasonably pluggable. So there might be hope in offshoring the work, although more 3rdparty means slower installs and more room for attack.
h
Yeah I wasn't there, but from what I understand, argparse wasn't powerful enough when the options system took place. We weren't using Rust either
fyi @rhythmic-morning-87313, a sneak peek of Pants 2.13 is that we made major improvements to command line arguments so that it's now consistent across every goal. There were weird things like that you run
./pants tailor
, not `./pants tailor ::`; and
./pants --changed-since=HEAD tailor
didn't work It's all consistent now 🙂 blog post coming later this month
🙌 2
b
w
if options parsing goes anywhere, it should go to rust, since John implemented 90% of the port already. that unblocks very, very low latency startup, without starting the python interpreter at all
💯 2
👀 3