-
Notifications
You must be signed in to change notification settings - Fork 0
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
Build a repository with direct-from-maven dependencies for which OSGi metadata needs to be generated #5
Comments
That would be great. Is currently Oomph's MavenBND.target meant to be that? In general I think it would be more suitable to place such repo in the eclipse-orbit organization. Btw. what do you think about always generating a special Header into wrapped artifacts like?
|
Do you see |
There's a new version of Lucene for wrapping so I'm wondering about this header's purpose?
It contains the same information as the Bundle-SymbolicName and Bundle-Version. Is that idea that multiple different-mapped jars could be tracked back to their original Maven coordinates? I guess an artifact ID cannot contains a '.' such that one could always determine the original Maven coordinates. If it can contain a '.', wouldn't it be better to use a ':' to separate the group and the artifact? |
No one has complained about what's generated but this surely looks very wrong: That's not a valid package name. I wonder what the services are for? This one has services and versions: But I don't know how those things end up on the classpath properly. I don't get a warm fuzzy feeling that these are actually correct, yet the Mylyn folks seems happy with them... |
Sorry I somehow forgot half of my comment. Yes the idea is that you can determine reliably if a bundle was wrapped and to find the original artifact of a wrapped bundle. This could be used to avoid multiple wrappings of the same artifacts and if we want that we could implement some checks for SimRel contributions based on that.
I have not yet looked into that in depth (I can do that tomorrow), but my first guess is that those are ServiceLoader files.
Yes that looks wrong, I can have a look at it tomorrow. |
The mockito-inline was actually correct, just very odd and only needed for old versions of mockito. Also I don't think lucene-queries and lucene-sandbox are actually used or needed by Mylyn... That leaves me to compare the Orbit versions of these remaining three things with these wrapped versions. They actually have the same odd structure (services and versions). The complex recipes really makes me concerned though that the simple recipe being used might be wrong, might need to change, and at that point it will be hard to change without a version increment: I definitely don't get a warm fuzzy feeling... |
Yes, since Mockito 5 the inline-mock is the default and delivered as part of the main artifact. They now have even discontinued that sub-project. So yes I agree that this should just be removed. The main mockito artifact has proper OSGi metadata.
I'll look into this tomorrow/today in detail (this time really, we have public holiday 😅) and check the results. The services entries seem to contain ServiceLoader files, so we either have to add corresponding ServiceLoader Medaitor entires or squash all the jars into one module by making all jars for example fragments of lucene-core. What I just have noticed is that But when already investigating the lucene project, I think it would be worth trying to make it proper bundles, as requested in
But from a quick look the maintainers seem to be reluctant and this project is build with Gradle (😒) . |
FYI, I am looking to rework the recipes for all these Lucene bundles. In particular, I have modified the recipe so that they will have the same bundle symbolic names as they had in Orbit making it easier to update to them. I was trying to switch to use package imports yesterday for Mylyn and for Data Tools, but with all these different Lucene versions floating around, that is simply exercise in frustration and futility; it's great in principle but in this case, it's unworkable. So instead I want to have bundles that are an easier drop-in replacement for the Orbit bundles. I will have to switch Mylyn to use them. I am also be jar-signing these things. I have also worked on a generator that will allow me to maintain version qualifiers for these things such that if the recipe needs to change a new qualifier version can be built that will allow updates to the new version of the artifact; more details on that when it's polished... |
Note that the build opened a whole whack of reviews now that the dash tool is properly kicking in again: https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues Some may be issues with the name not mapping directly to a Maven coordinate or with the version qualifier. It will need to get ironed out... |
If you want to look at any of the details and try things out, all the builds and generators can be run locally from this project setup: The Analyzer maintains these two files and there is a launcher to run it: In particular, it maintains the SHA1 value by digesting the BND instructions (normalized and without the underlined version qualifier) along with the dependency coordinates. If the digest changes, e.g, if the instructions are changed, it updates the digest and the version qualifier. This way I can be more reassured that it's possible to build new artifacts if some important BND instruction is overlooked.... |
Yes I already wanted to ask, what you want me to help with in detail because I have the impression that you are already making good progress. :) Btw. have you already found out how to handle the ServiceLoader config well, i.e. if we need ServiceLoader-Mediator entires or use fragments? |
My sense is that the current equivalent Orbit artifacts have exactly the same kind of "strange" structure and no one has complained, so I'm inclined to ignore it for the time being. I've also done all these experiments with the 9.5.0 versions even though there are 9.6.0 versions. And I added a bunch of things to deal with older Orbit artifacts that are stuck at the 7.x version... I produced this repository with jar-signed artifacts: I wonder if we can move the platform to use these new versions? And more importantly too, I wonder if we can get the Platform to stop including a specific version because that's a nightmare for downstream clients who want newer versions of Lucene than what the Platform is strictly requiring and redistributing... |
Looking at the code I wondered if it would be useful to use a DOM XML parser to load the model and operate on it directly instead of using RegEx Patterns?
If you set the
In my platform/equinox workspace only |
I have to look again into the bundles in details, but after inspecting the orbit receips I'm not sure if we should add the mandatory attributes to the split packages. This is definitely a difference, but the question is, if it is relevant. Looking at the lucene recipes, I really don't understand why others are often so convinced that with Maven targets we will get too many different version, even in the current Orbit we have three versions of lucene or two versions of Guava. 😰 |
Yes, it's easier to read with a DOM, but serializing and preserving format is hit and miss at best (as I see repeatedly when I edit a *.target file with the PDE editor). So I'd rather do some textual editing. ( If someone else wants to do all the work, and manage it going forward, they are of course welcome to do it as they wish. 😜 ) Here's the part of the platform that's of concern: This locks in one version and most products will ship with help with that locked-in version. We keep taking about everyone using the latest, so that must apply for the Platform too I assume... |
Understand and agree, I think I will skip this offer for participation this time 😅
Yes, I would be in favour of that as well. :) Furthermore I belive the version lock-in was not the main reason to include lucene in the Feature, probably it was only done to pull in the sources. 😅 |
Thinking about it again, the attributes are not necessary if only require-Bundle used, but if one uses Import-Package, this is nessesary to distinguish the packages since they have split them. If done in a smart way we can probably encode that in the package-exports in one instructions set with a few macros. |
Actually, I think the 9.5 structure does not have split packages. One course it's hard to tell for sure, so I worked on a packages view in the analyzer editor but still could find no split packages. I did find these in the SimRel aggregation: Maybe I don't understand the definition of "split package" or maybe I've overlooked something? |
I've been experimenting to understand BND better. I installed BND tools because it really helps to see the generated jar. Here I've modified the recipe so that the package imports of other lucene packages have version ranges: Of course I need to do a BND maven build to get to this "review" point, so @jonahgraham comment about iteratively editing the recipe to see what's generated does seem quite relevant. The cycle time here is relatively long. Also, the feedback on BND recipe errors is poor. Then there's Christoph's comment about "it was never meant to be used this way". In the end though, when I use the other dependabot like *.target updater, this is very easily changed to version 9.6.0 to build new wrappers so that at least is easier. Anyway, I assume it's a good idea to generate ranges on the packages! I have no way to know about provider/consumer relations here though... |
Looks like the reworked their bundle structure with lucene 9: I also checked all the lucene artifacts in your One course it's hard to tell for sure, so I worked on a packages view in the analyzer editor but still could find no split packages. I did find these in the SimRel aggregation: That's very handy! And yes the split-packages in platform are known and intended, although Tom Watson mentioned recently that the expected advantages of this split were never fulfilled.
Personally I'm torn if we should use the Maven-Targets as Orbit replacement. Using maven+bnd-maven-plugin is definitively more powerful, but often that power is not needed (as long as one only needs to generate a Manifest, the Manve-Targets can do everything) and I find Maven-targets simpler to set up and use. Furthermore I believe it also eases the migration to real OSGi artifacts (given that the original jars become OSGi-ready one day), because one already has the same artifact structure (Orbit used to merge and split artifacts).
Yes definitely, but as far as I know is Christoph is working on generating them automatically. In the meantime I suggest you to use the range macro to compute the Import-Package version range: |
No description provided.
The text was updated successfully, but these errors were encountered: