-
Notifications
You must be signed in to change notification settings - Fork 188
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
[ENHANCEMENT] Upgrade default JavaSE to latest LTS JDK #516
[ENHANCEMENT] Upgrade default JavaSE to latest LTS JDK #516
Conversation
tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java
Show resolved
Hide resolved
IMO, this is the good path forward. It's totally fine that in default case, Tycho uses latest supported Java version instead of contributing everyone to be glued in past releases. The default behavior can be opinionated, and my opinion is that people use latest release of everything possible. |
I don't think so. This will break everyone using currently Java 11. Assuming that everyone always uses latest is just wrong (or will platform instantly upgrade to J17 now?). The default should be the minimum required version to run Tycho (if we ever need such a default).
Instead of a hard-coded default it should be the version of the running JVM, that maps to the "default JRE" in eclipse JDT and PDE-Target definition. |
I'm attaching here a screenshot of the environment setting from the PDE target editor: As one can see there a three options:
|
I would only affect people who do not set executionEnvironment anyway, so those people are already opening the door to be broken (as some warning should mention) and it's fine to break them.
When Java 11 is EOL, in 1 year and 8 months. |
As outlined before I strongly disagree here. Assuming one every want do define an fixed EE is simply wrong and just a bad habit to claim those people are doing things "wrong". Especially if we just change the default to help people assuming Java-17 as their default.
Then this should be the time where we switch tycho as well.
This is neither interesting nor erroneous. The target already defines the environment where I want to build (or my build environment) requiring explicit/duplicate configuration is not what I want. |
It is erroneous or interesting. Maybe you didn't have yet encountered the experiences where this behavior has been helpful and saved hours of debugging downstream, but I often and still have as I work with many projects and people and environments. |
This is 1 year and 8 months at latest. But we are also dependent on other projects e.g. last time move to Java 11 was driven by Jetty dependency. So in case of such event it might happen earlier than that. But there will be at least 6 months notice period so as of today the earliest possible (but very unlikely!) release that could require Java 17 is 2022-12. |
Maybe but for me the error is clear from first second and I don't want a warning where it does not apply! This just makes people think warnings are something to not consider. If I run a build that requires J17 with a J11 jvm and get an error I can easily know whats wrong there is no need for "tool support". If I run a build that requires J11 with J11 and get warnings about using the default J11 I'm really mad. If I get additional warnings complaining about J16, 17, ... as its currently with tycho then I really think WTF?? and never "thanks for this useless warning"... |
Related to #517
You used an anonymous address |
Please also add a comment to TargetPlatformConfigurationMojo#executionEnvironments describing that if nothign is set current Java runtime is used. |
@laeubi I revalidate it and it's passing :)
@mickaelistria I don't know where / how the documentation is managed 🙊🙊 |
Documentation is generated from the javadoc at this mojo: |
tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java
Show resolved
Hide resolved
Doc updated and code tested on my side. Based on the Jenkins' configuration (installing only a JDK 11), every unit test should still work fine (as my modification should return So, I think that you can restart the full test pipeline now before merging my PR 🤗 |
Thanks! |
Just wanted to mention this will be a source of failures. Developers building on different machines will see different results for the exact same git checkout (due to accidentally running with a different JRE). Do you really want to spend time on issues raised because of that? |
How can I 'accidentally' running with an incompatible JVM? Git never has put any contracts on the runtime environment, thats a different topic. If special considerations are required this needs to be documented somewhere or asserted in the |
Switching from JavaSE-11 to new JavaSE-17 which is the latest LTS (from September 2021)