Skip to content

Commit

Permalink
[CELEBORN-837][BUILD] Add silencer plugin to suppress deprecated warn…
Browse files Browse the repository at this point in the history
…ings

### What changes were proposed in this pull request?

As title

### Why are the changes needed?

to suppress all warnings related to deprecations during the compilation process.

to fix
```
class OpenStream in package protocol is deprecated
        val openStream = msg.asInstanceOf[OpenStream]
```

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

tested locally

Closes #1760 from cfmcgrady/silence-deprecated.

Authored-by: Fu Chen <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
  • Loading branch information
cfmcgrady authored and pan3793 committed Jul 25, 2023
1 parent e8dd4bb commit e16b267
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<maven.plugin.shade.version>3.4.0</maven.plugin.shade.version>
<maven.plugin.spotless.version>2.24.1</maven.plugin.spotless.version>
<maven.plugin.surefire.version>3.0.0-M7</maven.plugin.surefire.version>
<maven.plugin.silencer.version>1.7.13</maven.plugin.silencer.version>

<!-- Allow modules to enable / disable certain build plugins easily. -->
<testJarPhase>prepare-package</testJarPhase>
Expand Down Expand Up @@ -660,7 +661,15 @@
<arg>-feature</arg>
<arg>-explaintypes</arg>
<arg>-Xfatal-warnings</arg>
<arg>-P:silencer:globalFilters=.*deprecated.*</arg>
</args>
<compilerPlugins>
<compilerPlugin>
<groupId>com.github.ghik</groupId>
<artifactId>silencer-plugin_${scala.version}</artifactId>
<version>${maven.plugin.silencer.version}</version>
</compilerPlugin>
</compilerPlugins>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -907,6 +916,7 @@
<scala.binary.version>2.12</scala.binary.version>
<spark.version>3.0.3</spark.version>
<zstd-jni.version>1.4.4-3</zstd-jni.version>
<maven.plugin.silencer.version>1.6.0</maven.plugin.silencer.version>
</properties>
</profile>

Expand All @@ -926,6 +936,7 @@
<scala.binary.version>2.12</scala.binary.version>
<spark.version>3.1.3</spark.version>
<zstd-jni.version>1.4.8-1</zstd-jni.version>
<maven.plugin.silencer.version>1.6.0</maven.plugin.silencer.version>
</properties>
</profile>

Expand Down

0 comments on commit e16b267

Please sign in to comment.