Skip to content

CI: start testing on JDK 25#8482

Merged
mbien merged 1 commit intoapache:masterfrom
mbien:ci-25ea
May 19, 2025
Merged

CI: start testing on JDK 25#8482
mbien merged 1 commit intoapache:masterfrom
mbien:ci-25ea

Conversation

@mbien
Copy link
Member

@mbien mbien commented May 4, 2025

  • bump upper bound from JDK 24 to 25ea
  • switch to temurin due to EA build availability (fails below b22, also see brute forced JDK matrix)
  • --enable-preview can be removed from a build script since "compact source files" are going final (JEP 512)
  • java hints job (and javadoc build) remains on JDK 24 until new nb-javac is integrated
  • EvaluatorTest: updated test data since java.lang.Runtime is now final (see below)

a test file seems to hit a JDK 25 compiler regression API change, Runtime is now final (openjdk/jdk#22389):

 [nb-javac] /home/runner/work/netbeans/netbeans/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/EvaluatorApp.java:730: error: incompatible types: Runtime cannot be converted to Iterable
 [nb-javac]         return (Runtime.getRuntime() instanceof java.lang.Iterable);

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) Maven [ci] enable "build tools" tests CI continuous integration changes labels May 4, 2025
@mbien mbien added this to the NB27 milestone May 4, 2025
@mbien mbien added the JavaDoc [ci] enable java/javadoc tests and build-javadoc target label May 4, 2025
@mbien mbien added the ci:all-tests [ci] enable all tests label May 17, 2025
@mbien mbien removed the ci:all-tests [ci] enable all tests label May 17, 2025
@mbien
Copy link
Member Author

mbien commented May 17, 2025

javac of EA JDK 25 (tested on b19-23) fails compiling

public class Mavenproject1 {
    public static boolean testOp36c() {
        return (Runtime.getRuntime() instanceof java.lang.Iterable);
    }
}
javac --release 25 Mavenproject1.java 
Mavenproject1.java:11: error: incompatible types: Runtime cannot be converted to Iterable
        return (Runtime.getRuntime() instanceof java.lang.Iterable);

note: it passes with --release 24. I am not sure if this is a javac feature or a bug tbh cc @lahodaj This is due to an API change, Runtime is now final - @neilcsmith-net found it right away ;).

@mbien mbien added the LSP [ci] enable Language Server Protocol tests label May 17, 2025
@mbien mbien removed the LSP [ci] enable Language Server Protocol tests label May 17, 2025
@mbien mbien marked this pull request as ready for review May 17, 2025 18:10
@mbien mbien requested review from ebarboni and neilcsmith-net May 17, 2025 18:13
@mbien
Copy link
Member Author

mbien commented May 18, 2025

planning to merge this soon

Comment on lines 65 to 72
DEFAULT_JAVA_DISTRIBUTION: 'zulu'
# CI requirements:
# - timely GA releases (no delays if possible)
# - EA builds must be available for the upcomming release (note: some vendors skip builds)
# - linux, win, mac (arm)
# - reliable / no extra sauce
DEFAULT_JAVA_DISTRIBUTION: 'temurin'
# DEFAULT_JAVA_DISTRIBUTION: 'sapmachine'
# DEFAULT_JAVA_DISTRIBUTION: 'zulu'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked again (before merge) just to be sure but zulu is still at build 19 of JDK 25 (https://cdn.azul.com/zulu/bin/). We need at least b22 (current is 23). The other vendors filtered out after running the brute force availability check again. So we could switch to temurin or sapmachine - nice to have multiple options IMO.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe need defaults for GA and EA separately? Interesting Temurin seems to be more timely with EA but usually slightly behind on GA?

Nitpick - upcoming, one m

Copy link
Member Author

@mbien mbien May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting Temurin seems to be more timely with EA but usually slightly behind on GA?

yep. But this is not necessarily a problem for us since we don't require both conditions at once. We could switch to zulu before release since we don't need EA during releases (edit: in fact, nothing should use EA during the release phase since EA builds may disappear after GA, this would cause problems when things are branched and need rebuilds later). I haven't watched sapmachine so far so I don't know how it behaves there.

Copy link
Member Author

@mbien mbien May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO: I rather switch everything periodically instead of using a different vendor for EA/GA

(fixed typo, thanks!)

 - bump upper bound from JDK 24 to 25 ea
 - switch to temurin due to EA build availability (fails below b22)
 - '--enable-preview' can be removed from a build script since
   "compact source files" are going final (JEP 512)
 - java hints job stays on JDK 24 until new nb-javac is integrated
 - EvaluatorTest: updated test data since java.lang.Runtime is now
   final
Copy link
Member

@neilcsmith-net neilcsmith-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

(edit: in fact, nothing should use EA during the release phase since EA builds may disappear after GA, this would cause problems when things are branched and need rebuilds later).

I'm less sure about this point. If we are using upcoming EA nb-javac to support, as well as possible, the next JDK in odd numbered releases, then we should consider how we test that during release phases. NetBeans 27 will, if we keep existing schedule, release a few weeks before JDK 25 is GA. I think the problems are handleable.

@mbien
Copy link
Member Author

mbien commented May 19, 2025

what I meant by that is that we can't have a workflow in the final release branch which uses EA builds. If releases overlap we can switch to GA during our release phase, but if a release branch would stick to EA, there is the risk that it won't build anymore at some point when the EA builds begin to disappear.

@mbien
Copy link
Member Author

mbien commented May 19, 2025

I guess we could also try to make the workflow smarter and teach it to try GA of the same version as fallback if EA dl fails.

@neilcsmith-net
Copy link
Member

Release branches can be updated if there's a real need to get workflows working again - eg. for an update release. A workflow broken on the actual release tag doesn't seem that problematic to me.

We could also switch off EA testing on the release branch - delivery and master are where it would be most useful anyway.

@mbien mbien merged commit 2e6d01a into apache:master May 19, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI continuous integration changes Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) JavaDoc [ci] enable java/javadoc tests and build-javadoc target Maven [ci] enable "build tools" tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants