https://pantsbuild.org/ logo
h

happy-kitchen-89482

02/09/2023, 4:58 PM
Even though I "work here", I am still confused about
fix
vs
fmt
. Can someone remind me what's up with that?
e

enough-analyst-54434

02/09/2023, 5:06 PM
IIRC
fmt
is a subset of
fix
but either
fmt
was deemed important enough to keep (don't break people) or there were a mix of solid consistent formatters out there but not so more general fixers? I know
cargo clippy --fix
is solid but I can imagine yolo fixers out there, especially in Python.
If so, green field, this smacks of the same issue as export - blanket goal where you want to sub-selct impls / resolves, etc.
b

bitter-ability-32190

02/09/2023, 5:08 PM
The razor was
--loop
. Not safe to loop on fix, but safe to loop on fmt
e

enough-analyst-54434

02/09/2023, 5:08 PM
That's not true of clippy --fix
And fmt is not safe to loop on either - you can type a few characters and have invalid syntax which will kill cargo fmt
b

bitter-ability-32190

02/09/2023, 5:09 PM
The mirror then would've been
pants lint --fix
which was voted down
e

enough-analyst-54434

02/09/2023, 5:10 PM
Ok. It sounds like basically a bikeshed. No solid reasons / razors. Vote, done. Is as it is.
👎 1
b

bitter-ability-32190

02/09/2023, 5:12 PM
The discourse was public...
e

enough-analyst-54434

02/09/2023, 5:12 PM
Basically a sin here is the whole idea of goals. It gets between people and their tools. Can be good can be bad
h

happy-kitchen-89482

02/09/2023, 5:12 PM
I remember the discourse, I just didn't remember the conclusion
e

enough-analyst-54434

02/09/2023, 5:13 PM
I can't just run pylint, I have to run lint and everything hooked up or use awkward ad-hoc skips that just work around the goal concept anyhow.
h

happy-kitchen-89482

02/09/2023, 5:13 PM
So do I need to run
fmt
and `fix`for completeness?
b

bitter-ability-32190

02/09/2023, 5:13 PM
Fix fixes everything (by also running formatters)
h

happy-kitchen-89482

02/09/2023, 5:13 PM
Ah, OK
perfect
e

enough-analyst-54434

02/09/2023, 5:14 PM
FWIW I just run fix fmt lint check test because I never know and will never remember the ~arbitrary nuance.
h

happy-kitchen-89482

02/09/2023, 5:14 PM
so I just need to remember
fix
e

enough-analyst-54434

02/09/2023, 5:14 PM
good luck!
😄 1
h

happy-kitchen-89482

02/09/2023, 5:14 PM
My brain is one-in-one-out at this point. If I can insert
fix
into the slot previously held by
fmt
, it's all good. If I have to remember both, I will forget how to tie my shoelaces or something.
😂 1
e

enough-analyst-54434

02/09/2023, 5:15 PM
I personally have a hard tie because I use pants a minority of the time. cargo a majority these days - where fmt is a thing and fix is not, and tox more than Pants where you pick the name.
Really, if you run support you need to
fmt fix
and then when that errors, you subtract
fix
since fix did not always exist.