-
Notifications
You must be signed in to change notification settings - Fork 73
Java 8 Incompatible Reference Check
(draft)
This job checks the libraries in a BOM do not have class files with Java 8 incompatible references of java.nio.Buffer classes generated by Java 9 compilers.
Given a BOM, the tool performs the following steps:
- Resolve the dependency graph for each artifact in the
dependencyManagement
section of the BOM - Search for the invalid references embed in the class files in the artifacts in the dependency graphs.
- Search for the invalid references embed in the class files in the latest version of the artifacts in the dependency graphs.
If it finds any references to the Java core library that are not present in Java 8 runtime, the job fails; otherwise the job succeeds.
This job runs daily through GitHub Actions.
Since late August 2020, Linkage Monitor and Linkage Checker are capable of finding the invalid references. As google-cloud-bom repository has Linkage Monitor setup, it should detect the problem as a pull request check. We don't need to setup additional check for the problem.
When the job fails, it notifies the owner of this repository (GoogleCloudPlatform/cloud-opensource-java). Depending on the step that detects failures, we follow-up library owners.
(the protobuf problem has affected the GCP Java client libraries already as of September 2020. Once it's resolved, as Linkage Monitor detects the problem upon pull requests, this case should not happen in future.)
If the job finds any invalid references at Step 2, we take the following actions:
- We communicate to the library owner to publish a new version that does not contain the invalid references. See the fix in Java 8 incompatible references of java.nio.Buffer classes generated by Java 9 compilers.
- Once they publish the new version, we communicate to GCP Java client libraries team to upgrade the dependency in other Google Cloud Java client libraries.
After we upgrade all of the dependencies and publish a new version of the BOM, the job should succeed.
If the job finds any invalid references at Step 3, but not in Step 2, it means the (problematic) latest version is not yet part of the dependency graphs of the libraries in the BOM. We take the following actions:
- We communicate to the library owner to publish a new version with a fix.
- We communicate to Google Cloud Java client team to wait until the problem is resolved.
After the latest version of the library fixes the problem, the job should succeed.