-
Notifications
You must be signed in to change notification settings - Fork 223
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
Remove unused imports #1004
Remove unused imports #1004
Conversation
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.6" exclude ("com.trueaccord.scalapb", "protoc-bridge_2.10")) | ||
libraryDependencies += "com.trueaccord.scalapb" %% "compilerplugin-shaded" % "0.6.0-pre5" | ||
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.11" exclude ("com.trueaccord.scalapb", "protoc-bridge_2.10")) | ||
libraryDependencies += "com.trueaccord.scalapb" %% "compilerplugin-shaded" % "0.6.0" |
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.
This diff is actually related to the removed imports. sbt-messagehost was using a conflicting version of scalapb which caused binary compat problems. Now that scalapb has a stable release then we should be safe from further binary compat issues.
I suspect this is uncontroversially an LGTM |
import scala.runtime.ScalaRunTime | ||
import scala.collection.{ mutable, immutable } | ||
import mutable.{ ListBuffer, StringBuilder } | ||
import scala.collection. mutable |
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.
This looks weird.
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.
This is a known issue scalacenter/scalafix#216 due to be fixed in the next release.
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.
Fix pending in scalacenter/scalafix#245 the rewrite has limitations for how much it can preserve formatting, it adds a lot of complexity to the rewrite. Ideally we should be using scalafmt to clean up stuff like this.
import scala.collection.{ mutable, immutable } | ||
import mutable.{ ListBuffer, StringBuilder } | ||
import scala.collection. mutable | ||
import mutable. ListBuffer |
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.
This, too.
@@ -851,7 +851,6 @@ class SuccessSuite extends FunSuite { | |||
} | |||
|
|||
test("1 t\"$tpe forSome { ..$stats }\"") { | |||
import scala.language.existentials |
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.
This import is unnecessary here, but I'm wondering whether you have tests for language imports in Scalafix.
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.
Scalafix piggybacks entirely on "Unused import" warnings from scalac so false negatives/positivies are bugs in scalac.
import scala.collection.{ mutable, immutable } | ||
import scala.language.postfixOps | ||
import mutable.{ ListBuffer, ArrayBuffer } | ||
import scala.collection. mutable |
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.
Weird.
@olafurpg Please take a look at the comments above. They may indicate weirdnesses in Scalafix. |
This diff was automatically created by scalafix + messagehost with no manual edits.