Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Tycho/Release Notes/2.0"

(Resolve system.packages against toolchain when not defined in profiles (Java 9+))
Line 51: Line 51:
 
=== Requires Maven 3.6.3 or more recent ===
 
=== Requires Maven 3.6.3 or more recent ===
  
=== Resolve system.packages against toolchain when not defined in profiles (Java 9+) ===
+
=== Resolve system.packages from Execution Envionment against toolchain or current JRE, from Java 13 ===
  
 
{{bug|563930}} Since Java 9 and module JVM, JREs can now have different sets of system packages from the same version. As a result, the list of system packages cannot be built statically. So Tycho will now query the defined toolchains when to get the actual system packages when requested (mainly for the '''tycho-compiler-plugin''' when '''requireJREPackageImports=true'''). If no matching toolchain is found, a warnign is emitted and the current Java runtime is used.
 
{{bug|563930}} Since Java 9 and module JVM, JREs can now have different sets of system packages from the same version. As a result, the list of system packages cannot be built statically. So Tycho will now query the defined toolchains when to get the actual system packages when requested (mainly for the '''tycho-compiler-plugin''' when '''requireJREPackageImports=true'''). If no matching toolchain is found, a warnign is emitted and the current Java runtime is used.
 +
 +
An error-prone workaround was implemented in Tycho 1.x for Java 9 and 11, with a static list of system packages. This workaround is still active for those Java version, but not for newer Java versions; but we may decide to remove the workaround in a near future (maybe even before 2.0 releases) to bring more consistency and correctness.
  
 
<!--
 
<!--
=== No a.jre.javase nor config.a.jre.javase generated ===
+
=== Proper BREE handling may require setting executionEnvironment in target-platform-configuration ===
 +
 
 +
With recent change for better Execution Environment and BREE handling, only 1 execution environment is added to the context for dependency resolution (unless <tt>resolveWithExecutionEnvironmentsConstraints</tt> is set to <tt>false</tt>) and this EE is usually derived from the BREE of the bundle. However, for dependency resolution to be reliable and relevant, it's best to enforce the executionEnvironment to be the higher one of the BREE requirement and the target-platform requirement. As Tycho cannot know in advance what is the required Java version for your target platform (ie your .target files and the referenced <tt>&lt;repositories></tt>), you'll probably need to upgrade manually the execution environment in case the EE required for the target-platform is higher than the bundle BREE.
 +
 
 +
This can be achieved by explicitly setting the <tt>&lt;executionEnvironment></tt> configuration child of the <tt>target-platform-configuration</tt> block as explained in [[Tycho/Execution_Environments#Execution_environment_configuration]].\
 +
 
 +
This extra step is actually a best practice as it allows to ensure what you're resolving and testing against better maps the content of your target environments. This will allow to catch issue like missing system packages when targetting newer Java version much earlier, during dependency resolution with a more explicit error message, rather than during the test execution.
 +
-->
 +
 
 +
<!--
 +
=== No more a.jre.javase nor config.a.jre.javase units generated ===
  
 
Since execution environments and system packages are now correctly handled, and {{bug|387701}} got fixed in Tycho 1.2; Tycho remove the extra (and error prone) <tt>a.jre.javase</tt> units that do not match current execution environment. Older products that have a hard requirement on those IUs instead of using an <tt>osgi.ee</tt> capability requirement will now face some issues at being resolved. The corresponding <tt>a.jre.javase</tt> units will need to be added to the target-platform for the product to resolve.
 
Since execution environments and system packages are now correctly handled, and {{bug|387701}} got fixed in Tycho 1.2; Tycho remove the extra (and error prone) <tt>a.jre.javase</tt> units that do not match current execution environment. Older products that have a hard requirement on those IUs instead of using an <tt>osgi.ee</tt> capability requirement will now face some issues at being resolved. The corresponding <tt>a.jre.javase</tt> units will need to be added to the target-platform for the product to resolve.
 +
-->
 +
 +
<!--
 
-->
 
-->
 
[[Category:Tycho|Release Notes/1.7]]
 
[[Category:Tycho|Release Notes/1.7]]

Revision as of 08:15, 29 June 2020

< Previous Version | Next Version >

SNAPSHOT builds

Tycho 2.0.0-SNAPSHOT is currently in development. To try out the most recent snapshot build, simply add the following snippet to your (parent) pom.xml or settings.xml, and set the property for the Tycho version (e.g. tycho-version) to 2.0.0-SNAPSHOT.

<pluginRepositories>
    <pluginRepository>
      <id>tycho-snapshots</id>
      <url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
    </pluginRepository>
</pluginRepositories>

SNAPSHOT site docs

Refer to the latest SNAPSHOT site docs for Tycho and Tycho Extras.


New and Noteworthy

Complete list of bug fixes and enhancements in 2.0.0-SNAPSHOT

Java 11

  • Tycho now requires Java 11 as a minimum runtime requirement
  • The default execution environment (EE) for the tycho-eclipserun-plugin was also bumped to Java 11
  • The default source and target settings for the tycho-compiler-plugin were also bumped to Java 11

Requires Maven 3.6.3 or more recent

Resolve system.packages from Execution Envionment against toolchain or current JRE, from Java 13

bug 563930 Since Java 9 and module JVM, JREs can now have different sets of system packages from the same version. As a result, the list of system packages cannot be built statically. So Tycho will now query the defined toolchains when to get the actual system packages when requested (mainly for the tycho-compiler-plugin when requireJREPackageImports=true). If no matching toolchain is found, a warnign is emitted and the current Java runtime is used.

An error-prone workaround was implemented in Tycho 1.x for Java 9 and 11, with a static list of system packages. This workaround is still active for those Java version, but not for newer Java versions; but we may decide to remove the workaround in a near future (maybe even before 2.0 releases) to bring more consistency and correctness.

Back to the top