Hey <@UB2J9BQA0>! Funny story! Internally at Twitt...
# development
a
Hey @hundreds-father-404! Funny story! Internally at Twitter we have a goal called
scalafix
which does the equivalent to your
--fmt --fmt-only=scalafix
proposed flag! I know this because when you added the
Scalafix
subsystem, and took the option scope, we started getting errors 😄 How sad would you be if I added a v1
--fmt-only
flag which only accepts not being set, or accepts exactly
scalafix
(i.e. not do the fully general solution) to help us with migration?
h
Totally fine with me! As stated in the google doc, it’s not in my near time roadmap to implement
—fmt-only
. My main goal was to deprecate
—fmt-skip
and that’s now done. (My next project for my free time is the Flake8 plugin so that we can deprecate the checker)
w
afaik,
--fmt-only
could maybe live on the
v2
fmt Goal, and be consumed by
v1
h
Yes, it can!
But, that won’t work until —fmt-skip is removed :/
w
true. note to selves, consider accelerating these deprecations.
a
afaik,
--fmt-only
could maybe live on the
v2
fmt Goal, and be consumed by
v1
Ooh fancy!
w
but see above re deprecation =/ ... unless it went on the mixin in the interim, which would work but be strange.
h
true. note to selves, consider accelerating these deprecations.
This problem is why I’m trying to get as many deprecations going now as possible, so that we’re not blocked by similar things in the future I’ll email pants-commiters about our discussion last week to slightly speed up deprecations
a
It could go in the mixin exactly until it moves to v2 - would be transparent?
h
Yes, I think that works fine! Fmt2 won’t have the functionality but that’s fine for now
a
#CreativeSolutions
w
there is a minor wart with doing it on the mixin (could do something like
--fmt-scalafix-only=..
) but i would be fine with that briefly appearing and then disappearing at the end of this deprecation cycle
h
Oh yeah the mixin gets applied to both the goal and the tasks...I don’t think the mixin would work?
w
it would, i think... would just have the wart above.
which imo is fine
a
I’ll see what I can hack together 🙂
h
Uh could you do something like an if statement to check if options scope == fmt and if not, don’t register the new option? Horribly hacky but it’s going away soon
a
Yeah, I’ll hack something 🙂
w
sooo, @average-vr-56795: what ended up being the conclusion here? looks like this is an issue in the nightly... is the idea to deprecate/remove the goal and suggest
./pants fmt --only=scalafix
instead?
👍 1
a
Ooh, I totally didn’t implement that, did I?
Or did I?
looks through history
Yeah, let’s deprecate the
scalafix
goal internally and suggest that 🙂
I’m pretty sure that internally I did the scope-renaming so that things would work in the mean time
@witty-crayon-22786 Yeah… I guess the thing we need to add is “if someone set
--scalafix-*
and didn’t explicitly set
--temp-scalafix-subsystem-*
override the value of the latter with the former… Ugh…
w
thanks. it sounds like toolchain are going to lead the
1.25.x
release next week, so i'll need to raise this on the rc threads.
but i think that we have the tools we need to fix it next week.