[Git][java-team/google-compile-testing-java][upstream/latest] New upstream version 0.24.0
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Thu Nov 12 15:13:45 GMT 2026
Emmanuel Bourg pushed to branch upstream/latest at Debian Java Maintainers / google-compile-testing-java
Commits:
4dfb5f54 by Emmanuel Bourg at 2026-11-11T18:32:02+01:00
New upstream version 0.24.0
- - - - -
7 changed files:
- .github/dependabot.yml
- .github/workflows/ci.yml
- CONTRIBUTING.md
- README.md
- pom.xml
- src/main/java/com/google/testing/compile/Compiler.java
- src/main/java/com/google/testing/compile/Parser.java
Changes:
=====================================
.github/dependabot.yml
=====================================
@@ -4,6 +4,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
+ cooldown:
+ default-days: 7
groups:
dependencies:
applies-to: version-updates
@@ -13,6 +15,8 @@ updates:
directory: "/"
schedule:
interval: "monthly"
+ cooldown:
+ default-days: 7
groups:
github-actions:
applies-to: version-updates
=====================================
.github/workflows/ci.yml
=====================================
@@ -8,6 +8,14 @@ on:
branches:
- main
+permissions:
+ contents: read
+
+# Cancel in-progress runs for pull requests, but not for master branch pushes
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
test:
name: "JDK ${{ matrix.java }}"
@@ -16,15 +24,12 @@ jobs:
java: [ 8, 11, 17, 21 ]
runs-on: ubuntu-latest
steps:
- # Cancel any previous runs for the same branch that are still running.
- - name: 'Cancel previous runs'
- uses: styfle/cancel-workflow-action at 85880fa0301c86cca9da44039ee3bb12d3bedbfa
- with:
- access_token: ${{ github.token }}
- name: 'Check out repository'
- uses: actions/checkout at 08c6903cd8c0fde910a37f88322edcfb5dd907a8
+ uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1
+ with:
+ persist-credentials: false
- name: 'Set up JDK ${{ matrix.java }}'
- uses: actions/setup-java at dded0888837ed1f317902acf8a20df0ad188d165
+ uses: actions/setup-java at de7274f081f381c8f8158605e0321c36c376e2e6
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
=====================================
CONTRIBUTING.md
=====================================
@@ -1,5 +1,4 @@
-Contributing
-============
+# Contributing
If you would like to contribute code to compile-testing you can do so through
GitHub by forking the repository and sending a pull request.
@@ -12,25 +11,24 @@ should be JUnit based tests and can use either standard JUnit assertions or
Truth assertions and be added to `<project>/src/test/java`.
Please make sure your code compiles by running `mvn clean verify` which will
-execute both unit and integration test phases. Additionally, consider using
+execute both unit and integration test phases. Additionally, consider using
http://travis-ci.org to validate your branches before you even put them into
-pull requests. All pull requests will be validated by Travis-ci in any case
-and must pass before being merged.
+pull requests. All pull requests will be validated by Travis-ci in any case and
+must pass before being merged.
If you are adding or modifying files you may add your own copyright line, but
please ensure that the form is consistent with the existing files, and please
note that a Google, Inc. copyright line must appear in every copyright notice.
-All files are released with the Apache 2.0 license and any new files may only
-be accepted under the terms of that license.
+All files are released with the Apache 2.0 license and any new files may only be
+accepted under the terms of that license.
-Checkstyle failures during compilation indicate errors in your style and will
-be displayed in the console output of the build (including in Travis-CI output),
-or can be viewed in the `checkstyle-result.xml` file. To save yourself some
-hassle, consider executing checkstyle first per: 'mvn checkstyle:checkstyle'.
-It's fast, and will catch style errors early.
+Checkstyle failures during compilation indicate errors in your style and will be
+displayed in the console output of the build (including in Travis-CI output), or
+can be viewed in the `checkstyle-result.xml` file. To save yourself some hassle,
+consider executing checkstyle first per: 'mvn checkstyle:checkstyle'. It's fast,
+and will catch style errors early.
Before your code can be accepted into the project you must sign the
[Individual Contributor License Agreement (CLA)][1].
-
- [1]: https://developers.google.com/open-source/cla/individual
+[1]: https://developers.google.com/open-source/cla/individual
=====================================
README.md
=====================================
@@ -1,32 +1,33 @@
-Compile Testing
-===============
+# Compile Testing
[![Build Status][ci-shield]][ci-link]
[![Maven Release][maven-shield]][maven-link]
[![Javadoc][javadoc-shield]][javadoc-link]
-A library for testing javac compilation with or without annotation processors. See the [javadoc][javadoc-link] for usage examples.
+A library for testing javac compilation with or without annotation processors.
+See the [javadoc][javadoc-link] for usage examples.
-License
--------
+## License
- Copyright 2013 Google, Inc.
+```
+Copyright 2013 Google, Inc.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+```
[ci-shield]: https://github.com/google/compile-testing/actions/workflows/ci.yml/badge.svg?branch=main
[ci-link]: https://github.com/google/compile-testing/actions
[maven-shield]: https://img.shields.io/maven-central/v/com.google.testing.compile/compile-testing.png
-[maven-link]: https://search.maven.org/artifact/com.google.testing.compile/compile-testing
+[maven-link]: https://central.sonatype.com/artifact/com.google.testing.compile/compile-testing
[javadoc-shield]: https://javadoc.io/badge/com.google.testing.compile/compile-testing.svg?color=blue
[javadoc-link]: https://javadoc.io/doc/com.google.testing.compile/compile-testing
=====================================
pom.xml
=====================================
@@ -3,14 +3,13 @@
<groupId>com.google.testing.compile</groupId>
<artifactId>compile-testing</artifactId>
- <version>0.23.0</version>
+ <version>0.24.0</version>
<name>Compile Testing</name>
<description>Utilities for testing compilation.</description>
<properties>
- <autovalue.version>1.11.0</autovalue.version>
- <truth.version>1.4.5</truth.version>
+ <autovalue.version>1.11.1</autovalue.version>
</properties>
<url>http://github.com/google/compile-testing</url>
@@ -51,13 +50,6 @@
<tag>HEAD</tag>
</scm>
- <distributionManagement>
- <snapshotRepository>
- <id>sonatype-nexus-snapshots</id>
- <url>https://central.sonatype.com/repository/maven-snapshots/</url>
- </snapshotRepository>
- </distributionManagement>
-
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -67,23 +59,17 @@
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
- <version>${truth.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.truth.extensions</groupId>
- <artifactId>truth-java8-extension</artifactId>
- <version>${truth.version}</version>
- <scope>test</scope>
+ <version>1.4.5</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>33.4.8-jre</version>
+ <version>33.7.2-jre</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
- <version>2.41.0</version>
+ <version>2.50.0</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -99,7 +85,7 @@
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1</version>
</dependency>
</dependencies>
@@ -116,7 +102,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.14.0</version>
+ <version>3.16.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@@ -132,43 +118,48 @@
</annotationProcessorPaths>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-release-plugin</artifactId>
- <version>3.1.1</version>
- <configuration>
- <releaseProfiles>sonatype-oss-release</releaseProfiles>
- <goals>deploy</goals>
- </configuration>
- </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>3.4.2</version>
+ <version>3.5.1</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.11.3</version>
- <configuration>
- <additionalJOptions>
- <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</additionalJOption>
- <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</additionalJOption>
- <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</additionalJOption>
- <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</additionalJOption>
- <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</additionalJOption>
- <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</additionalJOption>
- </additionalJOptions>
- </configuration>
+ <version>3.12.0</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals><goal>jar</goal></goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
- <version>3.21.0</version>
+ <version>3.22.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.4.0</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <!-- TODO(cpovirk): Use jar-no-fork, as we do in our other projects? -->
+ <goals><goal>jar</goal></goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>3.5.3</version>
+ <version>3.6.0</version>
<configuration>
<argLine>${test.jvm.flags}</argLine>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.sonatype.central</groupId>
+ <artifactId>central-publishing-maven-plugin</artifactId>
+ <version>0.11.0</version>
+ <extensions>true</extensions>
+ </plugin>
</plugins>
</build>
@@ -177,9 +168,7 @@
<id>tools-jar</id>
<activation>
<activeByDefault>false</activeByDefault>
- <file>
- <exists>${java.home}/../lib/tools.jar</exists>
- </file>
+ <jdk>1.8</jdk>
</activation>
<dependencies>
<dependency>
@@ -191,26 +180,6 @@
</dependency>
</dependencies>
</profile>
- <profile>
- <id>classes-jar</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- <file>
- <exists>${java.home}/../Classes/classes.jar</exists>
- </file>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>${java.version}</version>
- <scope>system</scope>
- <!-- TODO(dpb): Do we really need this? Isn't classes.jar always on the classpath? -->
- <!-- TODO(dpb): Is classes.jar obsolete on the Mac? -->
- <systemPath>${java.home}/../Classes/classes.jar</systemPath>
- </dependency>
- </dependencies>
- </profile>
<profile>
<id>sonatype-oss-release</id>
<activation>
@@ -229,32 +198,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <version>3.3.1</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals><goal>jar</goal></goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.11.3</version>
- <executions>
- <execution>
- <id>attach-docs</id>
- <goals><goal>jar</goal></goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.sonatype.central</groupId>
- <artifactId>central-publishing-maven-plugin</artifactId>
- <version>0.8.0</version>
- <extensions>true</extensions>
- </plugin>
</plugins>
</build>
</profile>
@@ -273,6 +216,23 @@
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
</test.jvm.flags>
</properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <additionalJOptions>
+ <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</additionalJOption>
+ <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</additionalJOption>
+ <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</additionalJOption>
+ <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</additionalJOption>
+ <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</additionalJOption>
+ <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</additionalJOption>
+ </additionalJOptions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
</project>
=====================================
src/main/java/com/google/testing/compile/Compiler.java
=====================================
@@ -133,7 +133,7 @@ public abstract class Compiler {
* determine or use for compilation.
* @deprecated prefer {@link #withClasspath(Iterable)}. This method only supports {@link
* URLClassLoader} and the default system classloader, and {@link File}s are usually a more
- * natural way to expression compilation classpaths than class loaders.
+ * natural way to express compilation classpaths than class loaders.
*/
@Deprecated
public final Compiler withClasspathFrom(ClassLoader classloader) {
=====================================
src/main/java/com/google/testing/compile/Parser.java
=====================================
@@ -63,7 +63,8 @@ final class Parser {
for (JavaFileObject source : sources) {
log.useSource(source);
JavacParser parser =
- parserFactory.newParser(
+ newParser(
+ parserFactory,
source.getCharContent(false),
/* keepDocComments= */ true,
/* keepEndPos= */ true,
@@ -84,6 +85,31 @@ final class Parser {
}
}
+ private static final boolean IS_END_POS_TABLE_PRESENT = getIsEndPosTablePresent();
+
+ private static boolean getIsEndPosTablePresent() {
+ try {
+ // JDK versions before https://bugs.openjdk.org/browse/JDK-8372948
+ Class.forName("com.sun.tools.javac.tree.EndPosTable");
+ return true;
+ } catch (ClassNotFoundException e) {
+ return false;
+ }
+ }
+
+ private static JavacParser newParser(
+ ParserFactory parserFactory,
+ CharSequence source,
+ boolean keepDocComments,
+ boolean keepEndPos,
+ boolean keepLineMap) {
+ if (IS_END_POS_TABLE_PRESENT) {
+ return parserFactory.newParser(source, keepDocComments, keepEndPos, keepLineMap);
+ }
+ return parserFactory.newParser(
+ source, keepDocComments, keepLineMap, /* parseModuleInfo */ false);
+ }
+
/** Returns {@code true} if errors were found while parsing source files. */
private static boolean foundParseErrors(List<Diagnostic<? extends JavaFileObject>> diagnostics) {
return diagnostics.stream().anyMatch(d -> d.getKind().equals(ERROR));
View it on GitLab: https://salsa.debian.org/java-team/google-compile-testing-java/-/commit/4dfb5f54f60f1e94dbb7151e7d1d6426ac2ddbea
--
View it on GitLab: https://salsa.debian.org/java-team/google-compile-testing-java/-/commit/4dfb5f54f60f1e94dbb7151e7d1d6426ac2ddbea
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261112/ba20ff12/attachment.htm>
More information about the pkg-java-commits
mailing list