-
Notifications
You must be signed in to change notification settings - Fork 161
Restore scalafix task to prePR #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Oh wooooooooooooow, nice idea!! I didn't think of that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple and elegant! Just 2 tiny changes requested.
build.sbt
Outdated
if (scalaVersion.value.startsWith("2.")) | ||
(root / Compile / scalafix).toTask("") | ||
else | ||
Def.task(()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change this to root / Compile / compile
so that Scala 3 does a recompile after scalafmt
? (I have had a few rare bad experiences and even though quite rare, I want to catch that if they pop up again)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes!
build.sbt
Outdated
@@ -144,6 +144,11 @@ val prePR_nonCross = taskKey[Unit]("Performs all necessary work required before | |||
ThisBuild / prePR_nonCross := Def.sequential( | |||
root / clean, | |||
root / Compile / scalafmt, | |||
root / Compile / compile, | |||
Def.taskDyn { | |||
if (scalaVersion.value.startsWith("2.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we indent this whole block within Def.taskDyn
Oops, seems I buggered this, fixing... |
build.sbt
Outdated
if (scalaVersion.value.startsWith("2.")) | ||
(root / Compile / scalafix).toTask("") | ||
else | ||
(root / Compile / compile).toTask("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the problem?
(root / Compile / compile).toTask("") | |
root / Compile / compile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, tried that already. Tbh I'm a bit stumped, never quite made friends with sbt lol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
Will fix #524.
Currently fails with: