-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Java baseline to 17 for 6.0 #4246
Comments
Consider using OpenRewrite's Gradle plugin and Java 17 recipe to find other ways of modernising the codebase. |
Will this also result in a major version change for the JUnit Platform? |
Why (not) upgrade to Java 21? https://www.java.com/releases/fullmatrix/
What's in Java 17 compared to Java 8 (7 years worth of features and bug fixes)? 🤯 What's in Java 21 compared to Java 17 (2 years worth of features and bug fixes)? |
Our strongest argument in AssertJ for targeting Java 17 and not 21 was the compatibility with the Spring Boot generations, as AssertJ is one of the libraries provided by the |
Yes, it will be JUnit 6. As stated in the issue's description:
|
Because major players in the Java ecosystem have all gone with Java 17 as the "new baseline" within the ecosystem, while still supporting later versions of Java, and we do not want JUnit to be the odd one out. |
We will also want to remove any flags that turn on "backward compatibility mode". For example, we should remove support for the |
Although it's a small detail, may I also propose to do #3141 (comment) ? |
We intend to change the major versions of the Platform, Jupiter, and Vintage. It's debatable whether Platform should be bumped to 2.0 or 6.0. Doing latter might simplify dependency management and comprehensibility for some. Thoughts? |
It would definitely simplify things for people and tools. Changing Vintage to align with Jupiter had positive side effects, and moving all 3 submodules to the same version number would take that a step farther. So, I think I'm in favor of 3 * 6.0 for Platform, Jupiter, and Vintage. |
For everything where we intend to change the default behavior (e.g. the |
Would it make sense to skip version 6 and go straight to JUnit 7? The alignment of Java 17 and JUnit 7 creates a simple association for users. |
If we skipped some versions, we should target JUnit 17 right away. |
I personally don't create a association between that. |
It depends I suppose. Unlike Vintage, the JUnit Platform is not user facing. And tools using the JUnit platform have a comparatively slow development pace. So there is value in being able to communicate that there are no breaking changes in the Platform, even if there are in JUnit. Though if you do not expect to make breaking changes to JUnit without also making breaking changes to the Platform then it doesn't matter and keeping the version numbers synced would simplify things. |
Added to the task list in the issue description. 👍 |
The thing is: we have never released JUnit Jupiter without releasing the Platform (and bumping its version number) along with it, even if there were no changes to the Platform JARs. We originally thought that we may at some point release them out of sync, but ever since JUnit 5.0 GA we have never done that. In addition, we sometimes make changes to the Platform (for example changes in In summary, having different version numbers for the Platform and Jupiter/Vintage seems to cause more problems than it was intended to solve. |
Might be a strange question, but I mean it really serious. And the answer might also affect the JUnit Pioneer extension library. The user guide says
In this ticket you speak of JUnit 6 so the left part of this "equation". You also noticed that you want to raise versions of platform and vintage (so I guess you keep the names). I'm confused about Jupiter, because I have in mind that it's named after the fifth planet of earth's solar system. Will this part of JUnit renamed to Saturn? Where will this lead with JUnit 9+? Why it affects JUnit Pioneer? Because Pioneer 10 was the first space probe that flew close to Jupiter... |
Yes, we will keep the names. We chose "names" over version "numbers" on purpose: to ensure that we don't have any issues with package or type names when we release a new generation or JUnit. For example, we originally had So, for JUnit 6, we are currently considering aligning all 3 versions as follows. JUnit 6.0 = JUnit Platform 6.0 + JUnit Jupiter 6.0 + JUnit Vintage 6.0
Indeed, we did pick "Jupiter" for JUnit 5, because it starts with "Ju" and is the 5th planet from our sun.
No.
I don't know if I'll even still be alive by that point in time, and I cannot predict the (potentially) distant future. 😇 But the plan is to keep using the Jupiter and Vintage module names as long as it makes sense.
🚀 |
Motivation
Java 8 is the current baseline of JUnit 5. It was released over 10 years ago and recent versions of Java have introduced many enhancements that make moving to a more recent JDK as the baseline for JUnit alluring. Moreover, there is movement in the ecosystem regarding this issue. For example, Spring has changed their baseline to JDK 17+ with 6.x and free support for 5.x will end in 2024. Similarly, AssertJ will move to Java 17. Therefore, we should consider making a similar move. Doing so would mean bumping the major version number and would allow us to clean up and simplify a number of things. This issue serves as a starting point for collecting those topics and tasks. For users stuck on Java 8 we will extend support for the last 5.x release for at least a year and backport security and important bug fixes to 5.x.
Todos
ConsoleLauncher
CLI (remove single-dash long options and mode without subcommand)type: breaking change
and decide whether they can be addressed in 6.0junit.platform.reflection.search.useLegacySemantics
) and potentially log a warning if they're used@TempDir
per context mode?AutoCloseable
instead ofCloseableResource
inStore
?TestInstancePostProcessor
and similar extensions wrt. method-levelExtensionContext
?The text was updated successfully, but these errors were encountered: