-
Notifications
You must be signed in to change notification settings - Fork 191
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
better support justj #154
Comments
JustJ documentation is outdated, this was slightly improved in latest Tycho release. |
In my particular case I was not able to make it work, as soon as I enable the The main point here is, that I think we should somehow detect something like justj in the target and configure tycho somewhat automatic so "just it works" without much extra configuration. |
That's not what's in the doc (also doc might be unclear). For this to work, JustJ must be part of the resolved target platform, as a dependency of any form, and
That's a good idea; but not desired in the general case: if I'm building a random bundle and using in the TP a p2 repo that contains JustJ, it doesn't imply at all that JustJ should be the EE and should take priority over the EE that's deduced from the .target or MANIFEST.MF file. This should remain a user decision and setting, not something to automate. |
at least to me obviously :-\
But that's what actually happens (and why I opened this ticket) as
that leads in my case to a state where I was not able to build anyone once I include the justj as a repository (even though I just reference it in a product as a feature). |
OK, I now understand the issue about negative requirements. |
Signed-off-by: Christoph Läubrich <[email protected]>
@mickaelistria I have created an example that shows the problem.
interestingly the build succeeds if one only uses a plugin based (just comment out the |
What makes the build succeed in this case is adding
as suggested in the documentation. In a larger project I'm getting resolution errors with this configuration (I'm currently try to reproduce this as well). Also as suggested I wonder if we could somehow "detect" the presence of such an ee in the target and maybe configure this by default? |
e.g. CustomEEResolutionHandler has checks to find a unit for the specified EE, so it seems possible to search for all units providing an EE and select the one that best fits. |
For the problematic dependency I get
during the build (without justj everything works fine or if I disable |
Using
|
I recently integrated the JustJ-JRE 11 in our build where we build bundles, features and products together and everything worked fine when using only the quoted configuration mentioned by you. But this only worked with Tycho 2.3.0 and not before. In order to make it work, I had to debug Tycho (since the doc was not updated yet) and found the following classes as interesting parts:
Maybe this helps you in debugging for your problem. |
OK, this should be fixed. I'm looking at it. |
I found out that adding the EE unit to |
Thanks for the analysis, does this matter in any way? |
Having extra a.jre.javase in product doesn't matter as long as they're not required together with justj. Building a bundle and building a product have opposite expectations: the bundle should force isage of the a.jre.javase from EE by default to get justj ignored, while the product shouldn't force any EE ehen justj is required. |
I include justj as a feature in the products where it is relevan't should this include justj even though it is "ignored"? |
Signed-off-by: Christoph Läubrich <[email protected]>
See #167 which shows a demo of how different projects play with JustJ. It looks like recent update to newer Equinox/p2 improved the situation enough so
|
@mickaelistria do you think we can add this change as a first step? Together with your example I think this is already a valuable improvement. |
See #167 is building fine on top of latest master; with just |
And let me repeat that "resolveWithExecutionEnvironmentConstraints" is a bad thing and should be avoided. I actually hope we can deprecate and remove this flag soon. |
Not using that option my build fails with:
|
Please add a test that shows this error. |
See my initial example and #154 (comment) what should show the problem. |
See #167 which includes your example and have things working fine. |
…yet) determined Signed-off-by: Christoph Läubrich <[email protected]>
Well you asked for an example that reproduces the error (and it doesn't really help to reference a different/adjusted one where it work then...), so for completeness I created: #174 that shows a common setup and fails with the given error... Using |
As mentioned |
But still executionEnvironment=none should not result in obsure error or do I misunderstand something? |
has |
Yes, this won't inject an unit to emulate the EE (a.jre.javase) and if no EE is already present in TP, it will make dependency resolution fails because of missing osgi.ee capabilities. |
@mickaelistria is your recent change to drop JREAction related here? |
I don't think so. |
After innumerous attempts to include a JustJ JRE 11 into a product build I luckily found this https://www.eclipse.org/forums/index.php?t=msg&th=1106526&goto=1836594&#msg_1836594
The only working solution for me was:
None of following settings worked for me.
|
"Did not work" is a bit vague can you explain the setup / problems your are encountered? Tycho include an example for a JustJ + product here: https://github.com/eclipse/tycho/tree/master/demo/justj/product |
Given:
.product file contains
Building the whole reactor (bundles, features, target, product) fails very early when resolving dependencies and finally ends up with
|
@bjmi if you still see issues with 3.0.0 release pleas open a new issue with your problem at best provide an integration-test to demonstrate the issue. |
The documentation of justj contaisn severals hint/issues on configuration for tycho. We shoudl try to better support justj.
One example is that currently using justj requires to use
<resolveWithExecutionEnvironmentConstraints>false</resolveWithExecutionEnvironmentConstraints>
in some cases as tycho otherwhise fails to resolve some bundles/dependecies, also the explicit configuration of<executionEnvironment>org.eclipse.justj.openjdk.hotspot.jre.full-15</executionEnvironment>
seems superflous.One can currently easyly break a build by simply reference justj as a repository...
The text was updated successfully, but these errors were encountered: