-
Notifications
You must be signed in to change notification settings - Fork 333
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
scalafix 0.13.0 #6807
scalafix 0.13.0 #6807
Conversation
- Support RemoveUnused on 3.3.4 - Load Scalafix with raw scalaVersion for ExplicitResultTypes to work against Scala 3 - allow dynamic loading of PC by default for ExplicitResultTypes
@@ -242,6 +242,8 @@ case class ScalafixProvider( | |||
|OrganizeImports.removeUnused = true | |||
|OrganizeImports.targetDialect = Scala3 | |||
| | |||
|ExplicitResultTypes.fetchScala3CompilerArtifactsOnVersionMismatch = true |
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.
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.
Users of ExplicitResultTypes will most likely have a custom cone anyway, but I guess it doesn't hurt to put it there
@@ -379,7 +383,7 @@ case class ScalafixProvider( | |||
} | |||
|
|||
val result = for { | |||
api <- getScalafix(scalaBinaryVersion) | |||
api <- getScalafix(scalaTarget.scalaVersion) |
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.
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.
Keeping 2.13 by default for community rules via
metals/metals/src/main/scala/scala/meta/internal/metals/ScalafixProvider.scala
Lines 343 to 344 in f1ba8c5
val scalaBinaryVersion = | |
if (isScala3) "2.13" else scalaTarget.scalaBinaryVersion |
@tgodzik I pushed the output of |
Thanks! I am out until 7th but I should be able to take a look as soon as I am back. |
6c61b77
to
023cbc6
Compare
In the end, I spinned off usage of scalafix 0.13.0 for the build to #6810, so this can be merged independantly. |
Seems some tests are indeed failing, I will take a look. Did the 2.11 support drop? |
I must say that I didn't have time to look.
One year ago, in Scalafix 0.11.0. But that's a good point, because of #5770, we can't always pass a full scala version since it isn't supported in the last scalafix-interfaces built for 2.11. That needs to be fixed here. |
@bjaglin I added a commit as fix, let me know if it's alright! |
@tgodzik apologies for sending that half-baked PR, I had done it way too late at night and way too quickly on the GitHub web UI ... LGTM! |
Release notes
Follows #6371