-
Notifications
You must be signed in to change notification settings - Fork 79
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
Enhance computation of system-package provided by a ExecutionEnvironment #693
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HannesWell
force-pushed
the
systemPackages
branch
from
August 3, 2023 00:18
a723310
to
d1dc6e5
Compare
HannesWell
commented
Aug 3, 2023
build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java
Outdated
Show resolved
Hide resolved
HannesWell
force-pushed
the
systemPackages
branch
2 times, most recently
from
August 10, 2023 20:52
fc6aaba
to
c565ea1
Compare
I now enhanced this:
|
HannesWell
force-pushed
the
systemPackages
branch
from
August 10, 2023 21:01
c565ea1
to
74d9257
Compare
HannesWell
force-pushed
the
systemPackages
branch
from
August 12, 2023 16:33
74d9257
to
8bd2f26
Compare
- In the Product or OSGi-app launch validation only consider EE of the VM that will run the app, match the later runtime-behavior - For the PDEState the EE's system-package is computed with the following distinction: - for a EE that corresponds to a Java-9 or higher release, get the 'best matching' VMInstall and query the system-packages for the EE's java release version (which is possible for modular JVMs) - for a Java-8 or lower release check if there is a VMInstall selected/strictly compatible to that version and query the system-packages from that VM (i.e. its rt.jar and other libraries) - if there is no VMInstall for a for a Java-8 or lower release, combine the hard-coded list of 'java.*' packages with the set of non-java packages provided by the default VMInstall of the workspace. The default VMInstall of the WS is at the same time the JVM selected in the active target definition (which sets its selection as WS default upon loading). - In general the available system-packages are only really known at runtime. Therefore at any other time, e.g. in the workspace, one can only guess/assume what packages are available and the implemented algorithm seems to be the best trade-off between probable accuracy, convenience and the possibility to let the user control the result. - Listen to changes of available VMInstalls and ExecutionEnvironment defaults. Re-read them on changes and re-resolve the PDE-State again with a subsequent re-validation of all Plugin projects. - Adapt existing test-cases that expected some packages to be reported as present although were not. Fixes eclipse-pde#429
HannesWell
force-pushed
the
systemPackages
branch
from
August 12, 2023 17:12
8bd2f26
to
b84ab4f
Compare
@gireeshpunathil you maybe want to back-port this If we don't encounter problems with this in the next week. |
thanks @HannesWell. sure, will do. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #429
Only consider EE of running VM in launch validation to match the behavior later at runtime
For the PDEState the EE's system-package is computed with the following distinction:
non-java packages provided by the default VMInstall of the workspace. The default VMInstall of the WS is at the same time the JVM selected in the active target definition (which sets its selection as WS default upon loading).
Listen to changes of available VMInstalls and ExecutionEnvironment defaults. Re-read them on changes and re-resolve the PDE-State again with a subsequent re-validation of all Plugin projects.
@laeubi in case one only has one JRE in the WS respectively none set as default of a EE, this is equivalent to your suggestion to just use the TP's JRE. This is convenient, but at the same time allows to be more specific if desired by providing/setting a JRE for an EE.
In my local testing that replicated the guice case, this worked well.
This is currently a draft since the list of java-packages still has to be completed. I'm on vacation for a week now, but will complete this once I'm back.