-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
upgraded to scala 2.12.2 and 2.11.11 and scalaJs #1632
Conversation
do we need to set: |
it's taken care of by the plugin |
Codecov Report
@@ Coverage Diff @@
## master #1632 +/- ##
=======================================
Coverage 93.37% 93.37%
=======================================
Files 240 240
Lines 3941 3941
Branches 144 141 -3
=======================================
Hits 3680 3680
Misses 261 261 Continue to review full report at Codecov.
|
lazy val xlint = Seq( | ||
scalacOptions += { | ||
CrossVersion.partialVersion(scalaVersion.value) match { | ||
case Some((2, 12)) => "-Xlint:-unused,_" |
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.
What’s the motivation for this?
I guess in 2.11, unused
wasn’t part of lint
, but is there a particular problem with it (asking because I’m in the process of enabling it on all my projects!)
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 now warns on unused parameters, vals and implicits according to scalac -xlint:help
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.
Right, but that sounds like a good thing to me. Where does that cause problems?
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.
I got quite a few seemingly related to simulacrum:
[error] /home/travis/build/typelevel/cats/core/src/main/scala/cats/Apply.scala:10: parameter value ev$macro$3 in method ap is never used
[error] @typeclass(excludeParents = List("ApplyArityFunctions"))
And implicit evidence that are not "in use" like
[error] /home/travis/build/typelevel/cats/core/src/main/scala/cats/data/Validated.scala:421: parameter value NT in method apply is never used
[error] def apply[A](f: => A)(implicit T: ClassTag[T], NT: NotNull[T]): Validated[T, A] =
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.
Ah I see. We have some evidence parameters that we don't directly use.
There's some related discussion here. It sounds like scala doesn't offer great options for selectively ignoring these. Unless someone sees a better option, I'm fine with this change coming in as-is.
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.
@kailuowang @ceedubs perhaps we should keep an eye on this PR as it might help with Simulacrum-related warnings
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.
that's good to know. Thanks @DavidGregory084
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 @kailuowang!
project/plugins.sbt
Outdated
@@ -7,7 +7,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.16") | |||
addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "0.8.0") | |||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0") | |||
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5") | |||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.14") | |||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.15") |
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.
Why not 0.6.16?
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.
just updated. 0.6.15 was the latest when this PR was created.
No description provided.