Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
<commons.collections.version>3.2.2</commons.collections.version>
<scala.version>2.12.10</scala.version>
<scala.binary.version>2.12</scala.binary.version>
<scalac.arg.unused-imports>-Ywarn-unused-import</scalac.arg.unused-imports>
<scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version>
<scalafmt.parameters>--test</scalafmt.parameters>
<!-- for now, not running scalafmt as part of default verify pipeline -->
Expand Down Expand Up @@ -2538,7 +2537,6 @@
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-explaintypes</arg>
<arg>${scalac.arg.unused-imports}</arg>
<arg>-target:jvm-1.8</arg>
</args>
<jvmArgs>
Expand Down Expand Up @@ -3262,13 +3260,12 @@
</pluginManagement>
</build>
</profile>

<profile>
<id>scala-2.13</id>
<properties>
<scala.version>2.13.3</scala.version>
<scala.binary.version>2.13</scala.binary.version>
<scalac.arg.unused-imports>-Wconf:cat=unused-imports:e</scalac.arg.unused-imports>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
3 changes: 3 additions & 0 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ object SparkBuild extends PomBuild {
Seq(
"-Xfatal-warnings",
"-deprecation",
"-Ywarn-unused-import",
"-P:silencer:globalFilters=.*deprecated.*" //regex to catch deprecation warnings and supress them
)
} else {
Expand All @@ -230,6 +231,8 @@ object SparkBuild extends PomBuild {
// see `scalac -Wconf:help` for details
"-Wconf:cat=deprecation:wv,any:e",
// 2.13-specific warning hits to be muted (as narrowly as possible) and addressed separately
// TODO Enable this option when Scala 2.12 is no longer supported.
Copy link
Contributor Author

@LuciferYang LuciferYang Nov 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HyukjinKwon A little interesting:

image

Scala 2.13 think this is a unused import but Scala 2.12 compile failed without this import, so comments -Wunused:imports in Scala 2.13 and left a TODO in this pr

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you file a JIRA under the Scala 2.13 umbrella JIRA? You can make a comment like TODO(SPARK-XXXXX): blah blah.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address 911acfe fix this

// "-Wunused:imports",
"-Wconf:cat=lint-multiarg-infix:wv",
"-Wconf:cat=other-nullary-override:wv",
"-Wconf:cat=other-match-analysis&site=org.apache.spark.sql.catalyst.catalog.SessionCatalog.lookupFunction.catalogFunction:wv",
Expand Down