Skip to content

Commit 61d831b

Browse files
LuciferYangdongjoon-hyun
authored andcommitted
[SPARK-40497][BUILD] Re-upgrade Scala to 2.13.11
This PR aims to re-upgrade Scala to 2.13.11, after SPARK-45144 was merged, the build issues mentioned in apache#41943 should no longer exist. - https://www.scala-lang.org/news/2.13.11 Additionally, this pr adds a new suppression rule for warning message: `Implicit definition should have explicit type`, this is a new compile check introduced by scala/scala#10083, we must fix it when we upgrading to use Scala 3 This release improves collections, adds support for JDK 20 and 21, adds support for JDK 17 `sealed`: - scala/scala#10363 - scala/scala#10184 - scala/scala#10397 - scala/scala#10348 - scala/scala#10105 There are 2 known issues in this version: - scala/bug#12800 - scala/bug#12799 For the first one, there is no compilation warning messages related to `match may not be exhaustive` in Spark compile log, and for the second one, there is no case of `method.isAnnotationPresent(Deprecated.class)` in Spark code, there is just https://github.com/apache/spark/blob/8c84d2c9349d7b607db949c2e114df781f23e438/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala#L130 in Spark Code, and I checked `javax.annotation.Nonnull` no this issue. So I think These two issues will not affect Spark itself, but this doesn't mean it won't affect the code written by end users themselves The full release notes as follows: - https://github.com/scala/scala/releases/tag/v2.13.11 Yes, this is a Scala version change. - Existing Test No Closes apache#42918 from LuciferYang/SPARK-40497-2. Authored-by: yangjie01 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent baf90c1 commit 61d831b

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

dev/deps/spark-deps-hadoop-3-hive-2.3

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jakarta.validation-api/2.0.2//jakarta.validation-api-2.0.2.jar
115115
jakarta.ws.rs-api/2.1.6//jakarta.ws.rs-api-2.1.6.jar
116116
jakarta.xml.bind-api/2.3.2//jakarta.xml.bind-api-2.3.2.jar
117117
janino/3.1.9//janino-3.1.9.jar
118+
java-diff-utils/4.12//java-diff-utils-4.12.jar
118119
java-jwt/3.14.0//java-jwt-3.14.0.jar
119120
javassist/3.25.0-GA//javassist-3.25.0-GA.jar
120121
javax.jdo/3.2.0-m3//javax.jdo-3.2.0-m3.jar
@@ -134,8 +135,8 @@ jettison/1.1//jettison-1.1.jar
134135
jetty-util-ajax/9.4.54.v20240208//jetty-util-ajax-9.4.54.v20240208.jar
135136
jetty-util/9.4.54.v20240208//jetty-util-9.4.54.v20240208.jar
136137
jline/2.14.6//jline-2.14.6.jar
137-
jline/3.21.0//jline-3.21.0.jar
138-
jna/5.9.0//jna-5.9.0.jar
138+
jline/3.22.0//jline-3.22.0.jar
139+
jna/5.13.0//jna-5.13.0.jar
139140
joda-time/2.12.2//joda-time-2.12.2.jar
140141
jodd-core/3.5.2//jodd-core-3.5.2.jar
141142
jpam/1.1//jpam-1.1.jar
@@ -239,11 +240,11 @@ py4j/0.10.9.7//py4j-0.10.9.7.jar
239240
remotetea-oncrpc/1.1.2//remotetea-oncrpc-1.1.2.jar
240241
rocksdbjni/7.10.2//rocksdbjni-7.10.2.jar
241242
scala-collection-compat_2.13/2.7.0//scala-collection-compat_2.13-2.7.0.jar
242-
scala-compiler/2.13.8//scala-compiler-2.13.8.jar
243-
scala-library/2.13.8//scala-library-2.13.8.jar
243+
scala-compiler/2.13.11//scala-compiler-2.13.11.jar
244+
scala-library/2.13.11//scala-library-2.13.11.jar
244245
scala-parallel-collections_2.13/1.0.4//scala-parallel-collections_2.13-1.0.4.jar
245246
scala-parser-combinators_2.13/2.1.1//scala-parser-combinators_2.13-2.1.1.jar
246-
scala-reflect/2.13.8//scala-reflect-2.13.8.jar
247+
scala-reflect/2.13.11//scala-reflect-2.13.11.jar
247248
scala-xml_2.13/2.1.0//scala-xml_2.13-2.1.0.jar
248249
shims/0.9.38//shims-0.9.38.jar
249250
slf4j-api/2.0.6//slf4j-api-2.0.6.jar

pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3821,7 +3821,7 @@
38213821
<profile>
38223822
<id>scala-2.13</id>
38233823
<properties>
3824-
<scala.version>2.13.8</scala.version>
3824+
<scala.version>2.13.11</scala.version>
38253825
<scala.binary.version>2.13</scala.binary.version>
38263826
</properties>
38273827
<build>
@@ -3874,6 +3874,10 @@
38743874
<arg>-Wconf:cat=unchecked&amp;msg=outer reference:s</arg>
38753875
<arg>-Wconf:cat=unchecked&amp;msg=eliminated by erasure:s</arg>
38763876
<arg>-Wconf:msg=^(?=.*?a value of type)(?=.*?cannot also be).+$:s</arg>
3877+
<!--
3878+
SPARK-40497 Upgrade Scala to 2.13.11 and suppress `Implicit definition should have explicit type`
3879+
-->
3880+
<arg>-Wconf:msg=Implicit definition should have explicit type:s</arg>
38773881
</args>
38783882
<compilerPlugins combine.self="override">
38793883
</compilerPlugins>

project/SparkBuild.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ object SparkBuild extends PomBuild {
287287
// 4. `fruitless type test: a value of TypeA cannot also be a TypeB`
288288
"-Wconf:cat=unchecked&msg=outer reference:s",
289289
"-Wconf:cat=unchecked&msg=eliminated by erasure:s",
290-
"-Wconf:msg=^(?=.*?a value of type)(?=.*?cannot also be).+$:s"
290+
"-Wconf:msg=^(?=.*?a value of type)(?=.*?cannot also be).+$:s",
291+
// SPARK-40497 Upgrade Scala to 2.13.11 and suppress `Implicit definition should have explicit type`
292+
"-Wconf:msg=Implicit definition should have explicit type:s"
291293
)
292294
}
293295
}

0 commit comments

Comments
 (0)