-
Notifications
You must be signed in to change notification settings - Fork 67
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
Replace embedded osgi packages by osgi-bundles from Maven-Central #18
Comments
That is not the proper tag for function, promise, or repository which are part of Compendium. The proper tag is https://github.com/osgi/osgi/releases/tag/r8-cmpn-final. The source jars for these are also on Maven Central.
We (Eclipse collectively) should start using things from Maven Central instead of repackaging in things like Bndtools includes these artifacts in its p2 repo. So if m2e does the same, I would hope p2 will allow use to "share" the same bundles. |
Thank you for the clarification.
Fully agree, I also wondered if we should do that. My initial assumption in the linked M2E issue that we should not re-supply the packages that are already in So I think the question is more how (announcement, time-frame, ...) should bundles like |
Getting rid of bundles is going to take a long time because of the history of the Eclipse project treating artifact names and versions as API. This predates usage of OSGi by the platform. In the mean time we could consider having I don't suggest Equinox include any new packages (such as We can update the tracker package source within |
YES! For reference, https://bugs.eclipse.org/bugs/show_bug.cgi?id=431633 seems to be the last attempt to get rid of |
I think this becomes easier now that we have support in place to directly consume the bundles available in maven central into our repositories in our builds. @HannesWell is this something you would be willing to look into? I think this would be safe to do from a compatibility standpoint. |
The change from 1.5.3 to 1.5.4 was to fix osgi/osgi#148. This fix changed to use nano seconds to wait. |
I haven't updated the packages in org.eclipse.osgi since the original core R8 release before the Eclipse OSGi WG was formed. I think that update was done when we did the re-release of core R8 under the OSGi WG. Is that correct? |
Sounds like a very good solution for all our requirements to me as well!
That's reasonable. I just wanted to have mentioned/discussed it. Then we will simply include the OSGi-bundles directly it into the m2e repo.
For the case of m2e this is not very important at the moment, but I can have a look at that as well.
Yes, I can take care this and if I don't oversee anything this should indeed be very simple now: And then do what Tom suggested and remove the resources so the plug-in becomes de-facto empty and only contains the Manifest. To have the Maven-dependencies also available in the dev-workspaces via the Oomph setups I think we have to wait for an I-build, but I will check that. |
GitHub tells me that is indeed the case. osgi/osgi@cf7d482 |
In case it is not clear, I suggest we remove the
In other words pick the minor version we should match to make sure is present for that version of Note that we cannot simply have a range that moves everything to the very latest. For example, before pulling in the latest And speaking of that. The current release of The other complication is the
I think PDE is currently depending on this package for its support for processing annotations. I think PDE should pull in this package itself for that purpose. Sorry this is reminding me more and more why these bad bundles are still here. |
Hannes lets start with the util bundle though. That should be something more simple that we can tackle and get the process down more easily. |
The very first part was clear to me, nevertheless thank you for the clarification. :)
That's a problem. How can this be addressed?
It is indeed used there. But from my first look I have to impression only the tests relay on it. |
Sounds good. 👍🏽 |
Yes, I think that is the path we need to take now and start the removal process/announcements.
I think it is more a question of how do typical developers use this annotation processing functionality of PDE. How do they get the annotations added to their classpaths. If they are using |
Alright. Good. It looks like this is feasible. 👍🏽
The PDE DS Builder/Support has an option to add the annotations implicitly to the classpath so that they don't have to be referenced in the MANIFEST. At the moment this only works in the IDE, but @laeubi added support for Tycho 3.0.0 already: But I suggest we keep the scope of this issue about the compatible replacement of the packages and discuss the migration of PDE in a dedicated issue there. Besides the already mentioned plug-ins I found the following equinox-plug-ins that embed osgi sources which could/should be replaced in the same way:
In contrast to the already mentioned plug-ins those also contain own sources so if we reexport the osgi-bundles this would be a more permanent solution. I assume we will encounter boot-strapping problems when we try to replaced the embedded osgi/felix sources in |
We no longer build the following bundles and we should remove the source from the main branch I think:
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=533801 I don't recall if there was a particular reason to keep the source in the main branch. But if there was some lingering hope they would become active again I think that time has past and we should be able to safely delete the source now. |
These are not high on my priority list to "fix" because they are at least providing implementations of the org.osgi APIs they export. It does seem that we should at least make them "good citizens" and have them use substitutable imports so that they could use the OSGi specification bundle exports if they are installed. Ultimately the best solution for these bundles would be to have them only use Import-Package to access the org.osgi packages and not do Require-Bundle re-export. The reason I recommend that approach for the org.eclipse.osgi.services/util bundles was I know there are many in the community of Eclipse plugins that use Require-Bundle to access content from these bundles. For coordinator and log.stream we can probably safely only use Import-Package for the org.osgi packages and not export any of the org.osgi packages from them. The set of bundles that are using Require-Bundle to access the org.osgi packages from these bundles should be pretty low and it wouldn't be a best practice if they did. The equinox.app may prove to be a bigger hit to current users. For that one we may need to use Require-Bundle/reexport but it really isn't a great position to be in. On the other hand it probably is a step forward from the current situation. |
Understand. I can create a PR to delete them. |
OK. I would then like to do it step by step then. Lets first tackle equinox-framework and then continue with easy once in equinox-bundles and finish with the hard once. |
I think no one will require-bundle the ds annotations, but import-package is quite frequent, but there are already dedicated providers for that package so I don't se a problem to remove that. |
That's what "internal" in package names and x-internal flag on export-package are doing. |
Nope this is just a convention, OSGi has no meaning of "internal exported package" beside that, the OSGi spec defines that package so we can't rename it.
yep might be possible to use that flag, but that would require all providers to act on it and I'm not sure it conforms to the spec. This is more a tooling issue, that the DS generator might suggest to remove that import (as it is not forbidden or illegal to import it). |
If you are referring to the one in maven at GAV
Yes, we could mark these as For BND, where it auto calculates the |
I'm doing my best to enable this and get some acceptance for this, but as you noted its a long way down the road :-) |
The PDE DS Builder can do that already. I think the only reason Import-Package is used is that Tycho required it. To address to problem to encourage users to remove existing Package-Imports/Require-Bundles of |
From OSGi POV I think its more to be expsected as part of the OSGI identity for example:
@tjwatson wdyt? Beside that the touch points seem to include the symbolic name + version for a bundle. |
As long as it's in the p2 metadata somewhere I can make use of it... |
I think the place to change this might be |
The bundle 'o.e.osgi.services' is deprecated for removal as part of eclipse-equinox/equinox#18 and already has been changed to only re-export the 'official' OSGi artifacts published to Maven-Central. It should be replaced by imports of the desired org.osgi.service.* packages so that the runtime can choose a suitable provider independently of the bundle name.
https://docs.osgi.org/specification/osgi.core/8.0.0/framework.module.html#d0e2870 So there is no Boolean to do something like:
You would have to use String (the default value type) "true" or "false" or use something else like Long where
Not sure what context you are using to reference that deprecated implementation of the old deprecated Equinox resolver API. The framework does this here: Lines 310 to 316 in bb97960
|
Note that this is already present:
So I suppose we should rephrase the question to ask, how best to represent that? |
Also note that is a directive (assignment with An attribute has an advantage that it can be used for matching or searching for capabilities in a repository, for example, by using a filter like |
It is already there as mentioned by @merks
Alright, it was just a quick idea, I think the best would be to just put in the message string, so given this example
it should be
Sadly P2 is using the old API (or more formally some classes from it), if you look here (public API!):
If you see a way P2 can have its own implementation of |
Question from someone who didn't followed up the entire thread but sees hat |
It's still in the update site: So that should be fine, shouldn't it? |
One needs also SDK + Egit + IBuild update site to install Egit? One can't simply "drop in" something to SDK that needs org.eclipse.osgi.services? Would this bundle also on the final update site for the release? Asking because now I can't simply "merge" SDK & Egit & the rest of my offline zip repositories in a script running offline, I need to download some extra bits before, and I don't understand where those bits are supposed to be coming from. |
The "bits" should come from the so called "target platform" (that is what egit is build against) so this target will/must include everything egit requires. |
OK, the answer is also "we don't care". |
Don't understand what you wanted to say with that, I can't find out what egit uses as its prerequisites I can't even find a github repo (or do they use gitlab?), but you seem to know it good enough to look there what they use as there target release. |
In all fairness, I don't think "we" understand what scripts and zips are involved in alternative ways to assemble an installation from parts. So it's not an issue of not caring, but rather one of not understanding. If the SDK installation doesn't need that bundle, then I'm not sure it's a strong argument to say, we should include it anyway because it makes some zip assembly scripts (that we don't understand) simpler... |
Actually we do care, which is why I already reached out to all users and even provided PRs for those where I have the git repos cloned: For EGit especially there is already eclipse-egit/egit#8, which was moved to https://eclipse.gerrithub.io/c/eclipse-egit/egit/+/1173902 The reason why it is not in the SDK anymore is probably because the o.e.sdk feature does not (transitively) contain it anymore and nothing else in the SDK installation requires it so that it is pulled in (which I think is a good news). As I have written here before or in #403, o.e.osgi.services should stay in the eclipse/updates and simrel repo for the deprecation period so anything that requires it and has one of those p2-repos available can pull it in, if an installation is provisioned with P2. |
Thanks, I haven't seen that.
I've not yet managed to migrate my account/setup to gerrithub, so I didn't saw the PR mail. I plan to migrate next year after vacation time. |
No problem.
It is actually quite simple to setup. You can just go to the linked change, click on the login (through GitHub) button, enter your credentials and are then asked by GitHub to grant GerritHub (read) access to a few data from your Github account. And that's it and you should be able to review the change. |
The bundle 'o.e.osgi.services' is deprecated for removal as part of eclipse-equinox/equinox#18 and already has been replaced to only re-export the 'official' OSGi artifacts published to Maven-Central. It should be replaced by imports of the desired org.osgi.service.* packages so that the runtime can choose a suitable provider independently of the bundle name. Change-Id: I7cd641671a3298fcb7b0d9dbdd3d0c2ef970a6c3
The bundle o.e.osgi.services has been deprecated for removal as part of eclipse-equinox/equinox#18
New and noteworthy entries for - eclipse-equinox/equinox#18 - eclipse-equinox/equinox#451
Just created the N&N entry for this: |
New and noteworthy entries for - eclipse-equinox/equinox#18 - eclipse-equinox/equinox#451
New and noteworthy entries for - eclipse-equinox/equinox#18 - eclipse-equinox/equinox#451
New and noteworthy entries for - eclipse-equinox/equinox#18 - eclipse-equinox/equinox#451
New and noteworthy entries for - eclipse-equinox/equinox#18 - eclipse-equinox/equinox#451
Except for Acelleo nobody in SimRel uses o.e.osgi.serives anymore. And Accelleo also intends to replace it in time: |
In M2E we would like to use
bnd.lib
6.1 respectively 6.2 (see eclipse-m2e/m2e-core#445) which imports newer version of the following OSGi packages than those that are embedded intoorg.eclipse.osgi
respectivelyorg.eclipse.osgi.util
:org.osgi.util.function
1.2.0 (available 1.1.0)org.osgi.util.promise
1.2.0 (available 1.1.1)org.osgi.util.tracker
1.5.4 (available 1.5.3, which is actually sufficient because bnd.lib requires only 1.5)Furthermore it requires the package the following package that is not embedded into any equinox bundle (at least I did not find it):
org.osgi.service.repository
1.1.0I assume it is desired to update those packages that are already available to the latest version?
Furthermore I assume to update them I have to copy the sources from the OSGi repository at the latest final release to the corresponding bundle in equinox:
https://github.com/osgi/osgi/releases/tag/r8-core-final-rerelease
How should we handle the missing
org.osgi.service.repository
?M2E does not use the repository functionality (AFAICT) but it is required to resolve the bundle.
Should we fetch it from Maven-Central (and make it part of the M2E p2-repo and consequently contribute it to SimRel) or should it be embedded into an Equinox bundle too?
@tjwatson could you please provide some advice?
The text was updated successfully, but these errors were encountered: