[crac] RFR: 8354679: [CRaC] jdk.crac.management makes JdkManagementCheckSince fail
Radim Vansa
rvansa at openjdk.org
Thu Apr 17 07:26:06 UTC 2025
On Wed, 16 Apr 2025 13:13:20 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
> Fixes the failing test, for simplicity pretending that both `jdk.crac` and `jdk.management/jdk.crac.management` were added in JDK 24 and before that there was no CRaC in the JDK. Otherwise we would need to retroactively generate symbols for JDKs 17–23 which is a decent amount of work (there are no public CRaC builds for some of these versions).
>
> JDK 24 symbols were updated this way:
> 1. Create a custom build from the last OpenJDK 24 CRaC commit 884d0746b168550f13bdc687b1d96d468aec4411 (the last commit before JDK 25 was merged).
> 2. Update the symbols from that build using `make/scripts/generate-symbol-data.sh`.
> 3. Manually remove the CRaC methods removed in d64fb30c0874d93c986ad04ac3995a727b7a1ac8 from the symbols.
>
> Also adds the since-checking tests to CI.
>
> I initially wanted to also add a since-checking test for `jdk.crac` module but `SinceChecker` seems to have a bug which makes the test fail with “module: jdk.crac: `@since` version is 24 but the element exists before JDK 10”. I believe this is a `SinceChecker` bug because the same happens for other modules added after JDK 9 without a legacy preview, e.g. `jdk.graal.compiler`.
Marked as reviewed by rvansa (Committer).
I think that it's OK to add the symbols to 24 only; CRaC versioning can be considered orthogonal to upstream JDK versioning. At this stage we keep backward compatibility for users' convenience, not as a rule. Testing API compatibility is useful as CRaC'ed JDK should be 100% usable as a drop-in replacement for upstream JDKs.
If `jdk.crac` can't be addressed, we can leave it out of scope. However could you file a bug for `SinceChecker` in upstream?
Last but not least; please outline the steps (can be just a comment on this PR) what will we have to do when we rebase on top of JDK 26.
-------------
PR Review: https://git.openjdk.org/crac/pull/225#pullrequestreview-2774834418
PR Comment: https://git.openjdk.org/crac/pull/225#issuecomment-2812026344
More information about the crac-dev
mailing list