-
Notifications
You must be signed in to change notification settings - Fork 33
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
suppressing the warning but not the error #7
Comments
Hello, It looks like something changed in how |
this is scala 2.12.4... we can't upgrade to 2.12.5 because of compiler plugin incompatibilities. |
Can't reproduce this with a synthetic test, which means it must be related to SBT and the way it modifies the default |
OK, I think I nailed it. There is a clash between def ensureSilencerIsLast(options: Seq[String]): Seq[String] = {
val (Seq(silencer), rest) = options.partition(o => o.startsWith("-Xplugin:") && o.contains("silencer"))
rest :+ silencer
}
scalacOptions in Compile := ensureSilencerIsLast((scalacOptions in Compile).value)
scalacOptions in Test := ensureSilencerIsLast((scalacOptions in Test).value) |
there are similar conflicts with clippy, I'm not sure what's going on because semanticdb forwards all messages to the underlying reporter so silencer should get messages even if semanticdb is enabled last. |
@olafurpg One way to fix this is to synchronize error/warning counts with the underlying reporter. This is what However, I think it would still be better if |
I think it would be good if all plugins tried to be good citizens to the best of their ability, with silencer at the end of the list as the nuclear option. |
@ghik aah, good catch! I've opened scalameta/scalameta#1505 to track this, I suspect synchronizing info/warn/error count should be a simple fix. I think it would actually be great to have silenced messages in SemanticDB since those can be useful for tooling. I've always wanted a mode to store in SemanticDB "Unused import" warnings without reporting them in the console since scalafix can automatically fix them. |
Ok, I think things are clear now and there isn't anything to do about it in |
thanks to you both! |
In this code https://github.com/scalaz/ioeffect/blob/6f57538969e38f62f942a05d0b7734483629dc62/src/main/scala/scalaz/ioeffect/Void.scala#L34-L35
we are able to suppress this warning
but when
scalacOptions in Compile += "-Xfatal-warnings"
is added, we getThe text was updated successfully, but these errors were encountered: