Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

rxin
Copy link
Contributor

@rxin rxin commented Jul 22, 2015

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.

@rxin rxin changed the title [SPARK-9262] Treat Scala compiler warnings as errors [SPARK-9262][build] Treat Scala compiler warnings as errors Jul 22, 2015
@@ -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
Copy link
Contributor

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.

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38106 has finished for PR 7598 at commit 87c354a.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class CreateArray(children: Seq[Expression]) extends Expression
    • case class CreateStruct(children: Seq[Expression]) extends Expression
    • case class CreateNamedStruct(children: Seq[Expression]) extends Expression

@JoshRosen
Copy link
Contributor

I wonder if we'll see any 2.11 compile breaks due to this in case 2.11 adds new warnings.

@srowen
Copy link
Member

srowen commented Jul 22, 2015

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.

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38109 has finished for PR 7598 at commit 542c031.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class CreateArray(children: Seq[Expression]) extends Expression
    • case class CreateStruct(children: Seq[Expression]) extends Expression
    • case class CreateNamedStruct(children: Seq[Expression]) extends Expression

@SparkQA
Copy link

SparkQA commented Jul 23, 2015

Test build #38128 has finished for PR 7598 at commit beb311b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor Author

rxin commented Jul 23, 2015

Alright I'm going to merge this.

@asfgit asfgit closed this in d71a13f Jul 23, 2015
@huitseeker
Copy link
Contributor

👍

@srowen
Copy link
Member

srowen commented Jul 24, 2015

Well after the fact, sorry, LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants