-
Notifications
You must be signed in to change notification settings - Fork 60
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
Produce correct module-info class for org.eclipse.osgi using BND #27
Comments
@tjwatson is module-info.class in o.e.osgi needed ? what could have caused it to no longer be generated/added |
module-info definition is provided in pom.xml equinox/bundles/org.eclipse.osgi/pom.xml Line 51 in 48152cb
|
There are extra maven tasks after merge. These extra maven tasks are causing the trouble. |
specifically there are two tasks that are running extra now
they are running just before add-module-info task. |
these should be independet from any other task generating sources, the more interesting would be if the moditec is running and if it issues any warning/errors. |
If I understood correctly @sravanlakkimsetti he sees p2-metadata task ran before add-module-info task and |
Provoked by eclipse-equinox#27 so build uses the latest plugin version.
you can see the log here please look for section add-module-info. As far as I see there is no error/warnings |
Then this seems like a false positive here, the p2-metadata task is required to update the meta-data after generating the source bundle. |
So maybe one can disable the baseline compare for the extra metadata task? |
Provoked by eclipse-equinox#27 so build uses the latest plugin version.
Provoked by #27 so build uses the latest plugin version.
I think the problem is that moditec is currently bound to |
Sounds correct, if you're not doing the change I'll do it right now. |
Unfortunately:
|
Stupid moditec... or baseline-compare ;-) I'll propose a patch using BND for the JPMS stuff... |
Thanks, @laeubi ! |
here are the decompiled class files Module-info from baseline : module-info.txt The differences:
Added extra
Added
|
Missing:
I'm not an JPMS expert, but as the interface is embedded in the OSGi jar it seems strange to declare its uses? Please let me know why this should be included and I can report this to the BND project.
reported here: bndtools/bnd#5288
Could it be a transitive one?
can you explain which one are unexpected so we can report an issue to BND? Will it harm to have those added? |
For anyone asking why the module-info is needed at all. It is to allow the framework impl to be placed on the module path along with a launcher without it being treated as a JPMS automatic module. In particular it is important for something called OSGi connect (from OSGi R8 core) that allows the framework and a set of bundles to have alternative sources of content from the typical JAR that is supported by default by all framework implementations. The Apache Felix Atomos project (https://github.com/apache/felix-atomos) provides such a launcher and connect implementation and can be used with Equinox or Felix frameworks to load the launcher, framework and set of bundles contained a JPMS module layer as modules. Once that can be done that that set of modules can then be jlink'ed into a jlink image that launches the framework and set of bundles with the minimal set of modules from the JVM.
Because the framework uses the Java ServiceLoader to discover
I'm not aware of anything the framework needs out of
This is an oversight in the current
The rest look to be not exported at all or exported as |
The BND part is described here, also how to customize this, I have enabled "edit by maintainer", so one could simply switch to file tab of the PR and edit the file, because my knowledge to JPMS is to limited here. Any obstacle should be reported to the BND people so this could be improved, I think it is much more useful to generate this stuff instead of us editing it manually. |
I have little time to focus on this today with any urgency. Can we not just accept the module-info is in a bad state for now and allow the I-Build to continue? If you are waiting for me it may not be for more than a week. |
I'm fine with that, so if you are... please approve the PR then and I'll merge it as soon as the build passes. |
I've repurposed this issue to confirm the output of the module-info class is correct. In particular we need to ensure the output can still be used for such things as Apache Felix Atomos. |
We need output of
Currently it looks like this:
It exports nothing, not sure why it has the contains stuff, but probably ok (but not necessary), it doesn't have the uses or provides stuff. I'll look at how to get BND to produce the correct stuff here. |
Log is:
at https://download.eclipse.org/eclipse/downloads/drops4/I20220616-0910/buildlogs/comparatorlogs/buildtimeComparatorUnanticipated.log.txt
The text was updated successfully, but these errors were encountered: