Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enables errorprone on JDK 10+ #761

Merged
merged 3 commits into from
Aug 20, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
51 changes: 18 additions & 33 deletions instrumentation/benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,39 +218,24 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration combine.self="override">
<!-- instead of javac-with-errorprone -->
<compilerId>javac</compilerId>
<!-- scrub errorprone compiler args -->
<compilerArgs/>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- disable errorprone on JMH source tree -->
<id>error-prone-off</id>
<activation>
<!-- error-prone isn't happy in jdk 10 yet https://github.com/google/error-prone/issues/860#issuecomment-396154710 -->
<jdk>[1.8,10)</jdk>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<compilerArgs>
<arg>-XepDisableAllChecks</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
36 changes: 3 additions & 33 deletions instrumentation/kafka-clients/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<main.java.version>1.8</main.java.version>
<main.signature.artifact>java18</main.signature.artifact>

<!-- disable errorprone override warning as we do this intentionally to allow old clients -->
<errorprone.args>-Xep:MissingOverride:OFF</errorprone.args>

<kafka.version>2.0.0</kafka.version>
<!-- must align with kafka version https://github.com/charithe/kafka-junit -->
<kafka-junit.version>4.1.2</kafka-junit.version>
Expand Down Expand Up @@ -84,37 +87,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- disable errorprone override warning as we do this intentionally to allow old clients -->
<id>error-prone-off</id>
<activation>
<!-- error-prone isn't happy in jdk 10 yet https://github.com/google/error-prone/issues/860#issuecomment-396154710 -->
<jdk>[1.8,10)</jdk>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<compilerArgs>
<arg>-Xep:MissingOverride:OFF</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
50 changes: 45 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<!-- override to set exclusions per-project -->
<!-- error-prone doesn't like generated code -->
<errorprone.args>-XepDisableWarningsInGeneratedCode</errorprone.args>

<!-- use the same values in bom/pom.xml -->
<zipkin.version>2.10.4</zipkin.version>
<zipkin-reporter.version>2.7.7</zipkin-reporter.version>
Expand Down Expand Up @@ -596,10 +600,9 @@

<profiles>
<profile>
<id>error-prone</id>
<id>error-prone-1.8</id>
<activation>
<!-- error-prone isn't happy in jdk 10 yet https://github.com/google/error-prone/issues/860#issuecomment-396154710 -->
<jdk>[1.8,10)</jdk>
<jdk>1.8</jdk>
<activeByDefault>false</activeByDefault>
</activation>
<build>
Expand All @@ -617,9 +620,8 @@
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<!-- error-prone doesn't like generated code -->
<compilerArgs>
<arg>-XepDisableWarningsInGeneratedCode</arg>
<arg>${errorprone.args}</arg>
</compilerArgs>
</configuration>
</execution>
Expand All @@ -640,6 +642,44 @@
</plugins>
</build>
</profile>
<profile>
<id>error-prone-9+</id>
<activation>
<jdk>[9,)</jdk>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<!-- only use errorprone on main source tree -->
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne ${errorprone.args}</arg>
</compilerArgs>
<annotationProcessorPaths>
<processorPath>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.3.1</version>
</processorPath>
</annotationProcessorPaths>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
Expand Down