Add java21-to-25 module: compile-once probes on JDK 21 and 25, removed APIs, build matrix, pinning, compact headers and containers
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# java21-to-25
|
||||
|
||||
Companion module for the ankurm.com post *Java 21 to Java 25 Migration Guide: What Breaks, What to Turn On, and the Upgrade Checklist*
|
||||
(<https://ankurm.com/java-21-to-25-upgrade-guide-ai-prompts/>). The explanation lives in the article, in collapsible sections; this folder has no `docs/`.
|
||||
|
||||
Probes in `src/probes/` and `src/pinning/` are compiled **once** with JDK 21 (`--release 21`) and run unchanged on both runtimes, so any difference is the runtime's.
|
||||
|
||||
## Tested with
|
||||
|
||||
JDK 21.0.13.1 (Ubuntu OpenJDK) and 25.0.5.1 (Temurin), the `eclipse-temurin:21-jre` / `25-jre` images, Maven 3.9.11, Gradle 8.14.3 and 9.9.3,
|
||||
Spring Boot 3.2.12 to 4.2.0, Lombok 1.18.34 to 1.18.48, Mockito 5.14.2 to 5.25.0, JUnit 6.1.3, JaCoCo 0.8.11 to 0.8.15. 2 vCPU Linux.
|
||||
|
||||
## Run it
|
||||
|
||||
```bash
|
||||
export JDK21=/path/to/jdk-21 JDK25=/path/to/jdk-25
|
||||
./scripts/run-all.sh # outputs 01-04 and 09-12
|
||||
./scripts/build-matrix.sh # outputs 05-08 (Maven, needs Maven Central)
|
||||
OLD_GRADLE=... NEW_GRADLE=... ./scripts/gradle.sh # output 13
|
||||
./scripts/containers.sh # output 14 (needs Docker; run after run-all.sh)
|
||||
```
|
||||
|
||||
## Output index
|
||||
|
||||
| File | Shows |
|
||||
|---|---|
|
||||
| [`01-runtime-behaviour.txt`](output/01-runtime-behaviour.txt) | Security Manager, `Subject.getSubject`, thread control, `Unsafe`, JNI, finalization, defaults |
|
||||
| [`02-startup-flags.txt`](output/02-startup-flags.txt) | JVM options on 21 and 25 |
|
||||
| [`03-source-and-preview.txt`](output/03-source-and-preview.txt) | 21 preview classes on 25; Scoped Values and Gatherers |
|
||||
| [`04-removed-api.txt`](output/04-removed-api.txt) | Public API in 21 that is gone in 25 |
|
||||
| [`05-lombok.txt`](output/05-lombok.txt) | Lombok versions and annotation-processor discovery |
|
||||
| [`06-mockito.txt`](output/06-mockito.txt) | Mockito / Byte Buddy and the agent setup |
|
||||
| [`07-jacoco.txt`](output/07-jacoco.txt) | JaCoCo versions |
|
||||
| [`08-spring-boot.txt`](output/08-spring-boot.txt) | Spring Boot versions with release 25 |
|
||||
| [`09-scanners.txt`](output/09-scanners.txt) | `jdeps` and `jdeprscan` |
|
||||
| [`10-locale-diff.txt`](output/10-locale-diff.txt) | Locale formatting differences (CLDR) |
|
||||
| [`11-pinning.txt`](output/11-pinning.txt) | JEP 491, and what still pins |
|
||||
| [`12-object-headers.txt`](output/12-object-headers.txt) | Compact object headers, bytes per object |
|
||||
| [`13-gradle.txt`](output/13-gradle.txt) | Gradle running on JDK 25 |
|
||||
| [`14-containers.txt`](output/14-containers.txt) | Container defaults and the rollback trap |
|
||||
|
||||
The AI prompts used in the article are in [`../lanes/prompts/`](../lanes/prompts). `scripts/removed_api.py` reads dumps made by `../api-diff/dump_api.py`.
|
||||
Reference in New Issue
Block a user