Skip to content

Commit 71344a9

Browse files
committed
[AURON #1870][BUILD] Add -Xfatal-warnings and resolve existing -Ywarn-unused warnings
1 parent 3264372 commit 71344a9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@
375375
<scalaVersion>${scalaLongVersion}</scalaVersion>
376376
<args>
377377
<arg>-Ywarn-unused</arg>
378+
<arg>-Xfatal-warnings</arg>
378379
</args>
379380
</configuration>
380381
<dependencies>
@@ -839,6 +840,7 @@
839840
<!-- In Scala 2.13, the plugin's functionality has been included in the compiler -->
840841
<!-- directly under the -Ymacro-annotations flag. -->
841842
<arg>-Ymacro-annotations</arg>
843+
<arg>-Xfatal-warnings</arg>
842844
</args>
843845
<compilerPlugins>
844846
<compilerPlugin>

spark-version-annotation-macros/src/main/scala/org/apache/auron/sparkver.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
*/
1717
package org.apache.auron
1818

19-
import scala.annotation.StaticAnnotation
20-
import scala.annotation.compileTimeOnly
19+
import scala.annotation.{compileTimeOnly, nowarn, StaticAnnotation}
2120
import scala.language.experimental._
2221
import scala.reflect.macros.whitebox
2322

@@ -97,16 +96,16 @@ object sparkver {
9796
}
9897

9998
@compileTimeOnly("enable macro paradise to expand macro annotations")
100-
final class sparkver(vers: String) extends StaticAnnotation {
99+
final class sparkver(@nowarn vers: String) extends StaticAnnotation {
101100
def macroTransform(annottees: Any*): Any = macro sparkver.Macros.verEnable
102101
}
103102

104103
@compileTimeOnly("enable macro paradise to expand macro annotations")
105-
final class sparkverEnableMembers(vers: String) extends StaticAnnotation {
104+
final class sparkverEnableMembers(@nowarn vers: String) extends StaticAnnotation {
106105
def macroTransform(annottees: Any*): Any = macro sparkver.Macros.verEnableMembers
107106
}
108107

109108
@compileTimeOnly("enable macro paradise to expand macro annotations")
110-
final class sparkverEnableOverride(vers: String) extends StaticAnnotation {
109+
final class sparkverEnableOverride(@nowarn vers: String) extends StaticAnnotation {
111110
def macroTransform(annottees: Any*): Any = macro sparkver.Macros.verEnableOverride
112111
}

0 commit comments

Comments
 (0)