Skip to content

#656 Upgrade Java 17 to 21 and Tycho 4.0.5 to 4.0.9

Dennis Hendriks requested to merge 656-upgrade-to-java-21 into develop
  • Best to review per commit.
  • End-user visible changes:
    • Eclipse ESCET now bundles Java 21 rather than Java 17.
    • The CIF code generator for Java now takes the keywords of Java 21 into account.
    • The CIF simulator can no longer execute external user-defined functions asynchronously. This means that termination requests are no longer processed during their execution. This change is due to Thread.stop always throwing UnsupportedOperationException as of Java 20 (see https://www.oracle.com/java/technologies/javase/20-relnote-issues.html#JDK-8289610). No alternative is provided. The simulator thus now executes external user-defined functions synchronously. I don't think this is a big issue, as external user-defined functions are rarely used. Using the 'External functions asynchronous execution' option produces an error message indicating that the option is no longer unsupported.
  • Other changes:
    • The Java upgrade documentation has a search term that is now no longer a link, making it easier to copy the term.
    • I removed a deprecated property from the crash report. I don't think we ever use this 'object pending finalization count' property. Technically, this an end-user visible change, but the data in the crash report is not meant for end users.
    • I had to also upgrade from Tycho 4.0.5 to a newer version, as it does not know about Java 21. I upgraded to the latest version, which is 4.0.9. This means that branch 634-upgrade-to-tycho-4.0.7 is no longer relevant. I'll remove it after merging this merge request.
    • I had to set explicit Java 21 versions in all Maven launch configurations, as the default is to use the version required to run Maven, which currently is Java 17 for the embedded Maven version in our development environment.
    • I checked all launch configurations and thereby Eclipse made various changes to them, reformatting them and adding new attributes with their default values.
    • I had to upgrade some 'Maven plugin' plugin related versions, to prevent a build warning Cannot determine the minimally required Java version automatically, it is recommended to configure some explicit value manually. for the plugin:3.8.2:descriptor (default-descriptor) @ org.eclipse.escet.common.asciidoc action of the build.
    • I then had to set the goalPrefix explicitly, as the new version of the 'Maven plugin' plugin could not determine it automatically anymore. This is because their plugin naming scheme doesn't match ours (we develop Eclipse plugins).
    • There were 5 not yet approved dependencies:
      maven/mavencentral/de.rototor.pdfbox/graphics2d/3.0.1, , restricted, clearlydefined
      maven/mavencentral/org.apache.pdfbox/fontbox/3.0.1, Apache-2.0 AND BSD-3-Clause AND OFL-1.1, restricted, clearlydefined
      maven/mavencentral/org.apache.pdfbox/pdfbox-io/3.0.1, Apache-2.0, restricted, clearlydefined
      maven/mavencentral/org.apache.pdfbox/pdfbox/3.0.1, Apache-2.0, restricted, clearlydefined
      maven/mavencentral/org.knowm.xchart/xchart/3.8.7, , restricted, clearlydefined
      I created IPLab issues for them:
      [INFO] This content is either not correctly mapped by the system, or requires review.
      [INFO] A review is required for maven/mavencentral/org.apache.pdfbox/fontbox/3.0.1.
      [INFO] A review request was created https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/16666 .
      [INFO] A review is required for maven/mavencentral/org.apache.pdfbox/pdfbox-io/3.0.1.
      [INFO] A review request was created https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/16667 .
      [INFO] A review is required for maven/mavencentral/de.rototor.pdfbox/graphics2d/3.0.1.
      [INFO] A review request was created https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/16668 .
      [INFO] A review is required for maven/mavencentral/org.knowm.xchart/xchart/3.8.7.
      [INFO] A review request was created https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/16669 .
      [INFO] A review is required for maven/mavencentral/org.apache.pdfbox/pdfbox/3.0.1.
      [INFO] A review request was created https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/16670 .
  • Notes:
    • After pulling in the new changes from develop, reload the target platform by opening the .target file and pressing 'Reload Target Platform'. Also, configure a Java 21 JDK under Window -> Preferences -> Java -> Installed JREs.
    • I ran into this problem: https://github.com/eclipse-pde/eclipse.pde/issues/1185. I had to remove the '"build.properties does not exist" warning on no-PDE projects' warnings once. They have not re-appeared.
    • I compared the build output of develop and this branch. I did not find any issues.

Closes #656 (closed)

Merge request reports

Loading