micronaut-projects / micronaut-core

Micronaut Application Framework
http://micronaut.io
Apache License 2.0
6.04k stars 1.06k forks source link

Consider dropping Java 17 in Micronaut framework 5. #10483

Closed sdelamo closed 6 months ago

sdelamo commented 7 months ago

We could consider dropping Java 17 for Micronaut Framework 5. Thus, Micronaut Framework 5 baseline would be Java 21.

Java 25 and Micronaut Framework 6

Java 25, the next LTS, is scheduled for September 2025. We could schedule Micronaut Framework 6 after September 2025, and Gradle supports Java 25. Gradle 8.4 supported Java 21 one month after the Java 21 release. Thus, we could aim for Micronaut Framework 6 release after November 2025. Then, support both 21 and 25 in Micronaut Framework 6 or set Java 25 as the baseline of Micronaut Framework 6.

Cloud vendors Java 21 support

Major cloud vendors support Java 21 February 12th.

Advantages

Reduce CI Build times

Supporting fewer Java versions in CI reduces our CI build matrix, decreasing build times and thus enhancing developer productivity.

Virtual Threads are always available

Setting Java 21 as the baseline will ensure that Virtual threads are always available.

We could remove the Virtual threads detection logic and lean more on Virtual threads throughout the framework.

Use Java 21 language features

We could leverage Java 21 features such as StringTemplates or improved pattern matching for records in the framework code and guides.

Disadvantages

Dropping a JDK forces users to run old versions of Micronaut

Any time we raise the baseline, some users will be unable to update to the latest version of the framework because they cannot update the Java baseline for various reasons.  

Please, vote in this poll and leave your thoughts in the comments below.

sdelamo commented 6 months ago

The core committers teams, Unity Foundation + Oracle Labs, had a Micronaut Framework 5 planning meeting last Thursday. We have decided to keep the Java 17 baseline for Micronaut Framework 5.