Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd2d655

Browse files
committed
Split -Wconf combined rules into separate flags for Scala 2.13.15+
Since Scala 2.13.15 (scala/scala#10708), the semantics of combined -Wconf rules changed: in '-Wconf:x,y', y now takes priority over x (last-match-wins), whereas before 2.13.15, x took priority (first-match-wins). This means '-Wconf:cat=deprecation:wv,any:e' now treats deprecation warnings as errors (any:e overrides cat=deprecation:wv), breaking Scala 2.13 compilation when -Pdelta is enabled. Split into separate -Wconf flags where later flags have higher priority: -Wconf:any:e (baseline) -Wconf:msg=While parsing annotations in:silent (override) -Wconf:cat=deprecation:wv (override) This aligns with Apache Spark's approach in SPARK-49746 (983f6f43). Gluten uses Scala 2.13.17 which is affected by this change. Reference: - scala/scala#10708 - apache/spark#48192
1 parent 406821d commit fd2d655

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

pom.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,11 +629,12 @@
629629
</dependencies>
630630
<recompileMode>${scala.recompile.mode}</recompileMode>
631631
<args>
632-
<arg>-Wconf:msg=While parsing annotations in:silent,any:e</arg>
632+
<arg>-Wconf:any:e</arg>
633+
<arg>-Wconf:msg=While parsing annotations in:silent</arg>
634+
<arg>-Wconf:cat=deprecation:wv</arg>
633635
<arg>-Ywarn-unused:imports</arg>
634636
<arg>-deprecation</arg>
635637
<arg>-feature</arg>
636-
<arg>-Wconf:cat=deprecation:wv,any:e</arg>
637638
<arg>-P:wartremover:traverser:io.github.zhztheplayer.scalawarts.InheritFromCaseClass</arg>
638639
<arg>-Ybackend-parallelism</arg>
639640
<arg>8</arg>
@@ -1026,7 +1027,8 @@
10261027
<arg>-feature</arg>
10271028
<arg>-explaintypes</arg>
10281029
<arg>-release:${java.version}</arg>
1029-
<arg>-Wconf:cat=deprecation:wv,any:e</arg>
1030+
<arg>-Wconf:any:e</arg>
1031+
<arg>-Wconf:cat=deprecation:wv</arg>
10301032
<arg>-Wunused:imports</arg>
10311033
<!--
10321034
TODO(SPARK-33805): Undo the corresponding deprecated usage suppression rule after fixed

0 commit comments

Comments
 (0)