Skip to content

Commit 4595dcd

Browse files
chore: disable errorprone for JDK 24 onwards (#1880)
* chore: disable errorprone for JDK 24 onwards * fix: remove all errorprone flags from compiler arguments
1 parent b9af4ce commit 4595dcd

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

pom.xml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
<artifactId>error_prone_core</artifactId>
7676
<!-- 2.32.0 and 2.33.0 break our java 11 build with compiler errors, I reported this to the
7777
errorprone team, but try upgrading to new versions in the future-->
78+
<!-- This version is only compatible with JDKs < 24. We have a profile below that disables
79+
errorprone for JDKs >= 24. -->
7880
<version>2.31.0</version>
7981
</dependency>
8082
<dependency>
@@ -159,6 +161,27 @@
159161
</modules>
160162

161163
<profiles>
164+
<profile>
165+
<!-- the current errorprone version does not support JDK 24 onwards -->
166+
<id>no-errorprone-jdk-24-onwards</id>
167+
<activation>
168+
<jdk>[24,)</jdk>
169+
</activation>
170+
<build>
171+
<plugins>
172+
<plugin>
173+
<artifactId>maven-compiler-plugin</artifactId>
174+
<configuration>
175+
<fork>true</fork>
176+
<compilerArgs combine.children="append">
177+
<!-- we only use the basic compilation flags without activating errorprone -->
178+
<arg>-XDcompilePolicy=simple</arg>
179+
</compilerArgs>
180+
</configuration>
181+
</plugin>
182+
</plugins>
183+
</build>
184+
</profile>
162185
<profile>
163186
<id>include-samples</id>
164187
<modules>
@@ -168,7 +191,7 @@
168191
<profile>
169192
<id>jdk9</id>
170193
<activation>
171-
<jdk>[1.9,)</jdk>
194+
<jdk>[1.9,23)</jdk>
172195
</activation>
173196
<build>
174197
<plugins>

0 commit comments

Comments
 (0)