Bug 580807 - CPP package has 11 and 17 listed as osgi.requiredJavaVersion
Summary: CPP package has 11 and 17 listed as osgi.requiredJavaVersion
Status: RESOLVED FIXED
Alias: None
Product: EPP
Classification: Technology
Component: all-packages (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.26 / 2022-12   Edit
Assignee: Jonah Graham CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-26 13:43 EDT by Jonah Graham CLA
Modified: 2022-12-01 14:12 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonah Graham CLA 2022-09-26 13:43:00 EDT
CPP package has 11 and 17 listed as osgi.requiredJavaVersion, which is essentially a duplicate of bug 576113 (with Ed's prescient comment Bug 576113 Comment 3). However we probably need to work around this one as there is no error about launching with Java 17 since the last argument is taking priority.

This is the -vmargs for CPP in 2022-09:

-vmargs
-Declipse.p2.max.threads=10
-Doomph.update.url=https://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED
-Dosgi.requiredJavaVersion=17
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-Dsun.java.command=Eclipse
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
Comment 1 Jonah Graham CLA 2022-09-26 13:52:07 EDT
@Ed - does one of your cool tools let me search all of SimRel for touchpoints that add requiredJavaVersion?
Comment 2 Ed Merks CLA 2022-09-27 02:39:02 EDT
No fancy tool, but you can open the content.jar and search the content.xml.  I believe the following is the culprit because I do see it in the profile of a CPP installation.   (You can view the profile contents using the Repository Explorer which has the profile in the drop down of repository choices.)

<unit id='toolingorg.eclipse.platform.ide.ini.win32.win32.x86_64' version='4.25.0.I20220831-1800' singleton='false'>
  <provides size='2'>
    <provided namespace='org.eclipse.equinox.p2.iu' name='toolingorg.eclipse.platform.ide.ini.win32.win32.x86_64' version='4.25.0.I20220831-1800'/>
    <provided namespace='toolingorg.eclipse.platform.ide' name='org.eclipse.platform.ide.ini' version='4.25.0.I20220831-1800'/>
  </provides>
  <filter>
    (&amp;(osgi.arch=x86_64)(osgi.os=win32)(osgi.ws=win32))
  </filter>
  <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
  <touchpointData size='1'>
    <instructions size='2'>
      <instruction key='unconfigure'>
        removeJvmArg(jvmArg:-Dosgi.requiredJavaVersion=11);removeJvmArg(jvmArg:-Dosgi.dataAreaRequiresExplicitInit=true);removeJvmArg(jvmArg:-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true);removeJvmArg(jvmArg:-Xms40m);removeJvmArg(jvmArg:-Xmx512m);removeJvmArg(jvmArg:--add-modules=ALL-SYSTEM);removeProgramArg(programArg:--launcher.defaultAction);removeProgramArg(programArg:openFile);removeProgramArg(programArg:--launcher.appendVmargs);
      </instruction>
      <instruction key='configure'>
        addJvmArg(jvmArg:-Dosgi.requiredJavaVersion=11);addJvmArg(jvmArg:-Dosgi.dataAreaRequiresExplicitInit=true);addJvmArg(jvmArg:-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true);addJvmArg(jvmArg:-Xms40m);addJvmArg(jvmArg:-Xmx512m);addJvmArg(jvmArg:--add-modules=ALL-SYSTEM);addProgramArg(programArg:--launcher.defaultAction);addProgramArg(programArg:openFile);addProgramArg(programArg:--launcher.appendVmargs);
      </instruction>
    </instructions>
  </touchpointData>
</unit>


Note that I think all packages have this problem...
Comment 3 Ed Merks CLA 2022-09-27 02:49:41 EDT
I guess all the args from /org.eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/platform.product are included.

<product name="Eclipse Platform" uid="org.eclipse.platform.ide" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="4.26.0.qualifier" useFeatures="true" includeLaunchers="true">

   <configIni use="default">
   </configIni>

   <launcherArgs>
      <programArgs>--launcher.defaultAction openFile --launcher.appendVmargs
      </programArgs>
      <vmArgs>-Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms40m -Xmx512m --add-modules=ALL-SYSTEM
      </vmArgs>
      <vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
      </vmArgsMac>
   </launcherArgs>

All the products have this in their p2.inf

# add requirement on org.eclipse.platform.ide
requires.1.namespace=org.eclipse.equinox.p2.iu
requires.1.name=org.eclipse.platform.ide
requires.1.greedy=true

I wonder if it really make good sense to require the product IU of some other product?  I guess one avoid duplicating the <configuration> section and keeps the <features> in sync without duplicating them, but it seems problematic for the <launcherArgs> section...
Comment 4 Eclipse Genie CLA 2022-09-27 14:53:28 EDT
New Gerrit change created: https://git.eclipse.org/r/c/epp/org.eclipse.epp.packages/+/196074
Comment 5 Jonah Graham CLA 2022-09-27 14:55:43 EDT
I have provided a gerrit that fully defines our own product. It does mean duplicating a bunch of fiddly stuff from platform though, so there is also a new step in the releasing to make sure to check https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/tree/master/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/ for changes.
Comment 7 Jonah Graham CLA 2022-10-03 10:32:00 EDT
This actually applies to all-packages, therefore when we send out 2022-12 M1 for testing I will highlight this.
Comment 8 Eclipse Genie CLA 2022-12-01 14:12:22 EST
New Gerrit change created: https://git.eclipse.org/r/c/epp/org.eclipse.epp.packages/+/197446