-
Notifications
You must be signed in to change notification settings - Fork 28.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
[SPARK-9262][build] Treat Scala compiler warnings as errors #7598
Conversation
@@ -94,6 +94,8 @@ private[spark] object JsonProtocol { | |||
logStartToJson(logStart) | |||
case metricsUpdate: SparkListenerExecutorMetricsUpdate => | |||
executorMetricsUpdateToJson(metricsUpdate) | |||
case blockUpdated: SparkListenerBlockUpdated => | |||
throw new MatchError(blockUpdated) // TODO(ekl) implement this |
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 think there's an open PR to implement this.
Test build #38106 has finished for PR 7598 at commit
|
I wonder if we'll see any 2.11 compile breaks due to this in case 2.11 adds new warnings. |
I think there are generally no un-resolvable Scala warnings in Spark, and I do find it's been necessary several times to go back and squash lots of warning-generating code that's been committed. Some Scala warnings in 2.10 are errors in 2.11, even. So, yeah I'd prefer to enforce this more strictly too. |
Test build #38109 has finished for PR 7598 at commit
|
Test build #38128 has finished for PR 7598 at commit
|
Alright I'm going to merge this. |
👍 |
Well after the fact, sorry, LGTM |
I've seen a few cases in the past few weeks that the compiler is throwing warnings that are caused by legitimate bugs. This patch upgrades warnings to errors, except deprecation warnings.
Note that ideally we should be able to mark deprecation warnings as errors as well. However, due to the lack of ability to suppress individual warning messages in the Scala compiler, we cannot do that (since we do need to access deprecated APIs in Hadoop).
Most of the work are done by @ericl.