-
Notifications
You must be signed in to change notification settings - Fork 116
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
Import aQute.bnd packages and remove bnd.lib from pde-feature #652
Conversation
@laeubi , @mickaelistria any objections? |
This requires some version increments. |
That's fine, beside the rationale, we should not try to "align" dependencies with other unrelated project, OSGi can perfectly handle this case and its not our obligation to handle such cases. Beside that import-package is always better.
Instead of removing that we could thing about including it as a dependency with a |
Actually I think we should bump all bundles to 2.0.0 if we assume a major change it dosen't make sense to keep old versions mixed with new versions. With #644 I'll anyway have some more version bumps to 2.0 ... |
That's not how semantic versioning is supposed to work. How version does bump depends on the changes that participate in the new version and only a new API introduced (or re-exported) by a bundle is supposed to require a major bump. This allows to optimize re-usability and modularity. |
That's not completely true. e.g a bundle that uses API from m2e.core 2.x (is there any not depending on that?) needs add a new version import as we claim API version is incompatible to 1.x. As we currently not versioning packages this requires the consumer to become incompatible as well as it obviously can't work with an older version. |
Yes, but as long as the core API doesn't "leak" in the public API of the consumer API, it doesn't have to go to new major, it's actually an internal change that qualifies for +0.0.1. However, if the core API is used in signatures of the consumer API, then yes, it's propagating; and -I believe- the requirement on Core API should ideally be re-exported by the consumer bundle to clarify that. |
<bundle id="biz.aQute.bnd.util"> | ||
<category name="m2e"/> | ||
</bundle> | ||
<bundle id="biz.aQute.bnd.util.source"> | ||
<category name="m2e"/> | ||
</bundle> | ||
<bundle id="biz.aQute.bndlib"> | ||
<category name="m2e"/> | ||
</bundle> | ||
<bundle id="biz.aQute.bndlib.source"> | ||
<category name="m2e"/> | ||
</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a dedicated category like "Transitive dependencies" or, even better but harder to setup, no category at all (but removing a category create a dumb "Uncategorized" category....)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as mentined above I don't see any value in adding this in the category as no one want to install this independent from the pde feature... it should simply be a Dependecy their with proper version range...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making them a dependency in the feature doesn't include them in the p2 repository. Things that are included in p2 repo are only what's explicitly part of the category.xml or .product files, and their included dependencies. Turning an inclusion into a requirement usually removes the content from the p2 repo, so we need to explicit somewhere else to add the content to the p2 repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this is true, is there an integration test showing that? At the p2 level there is no difference between an included
versus depended
they both end up as a (direct) requirement that is then included in the update-site (even if not visible in the install dialog).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this is true, is there an integration test showing that?
Please try and see by yourself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a dedicated category like "Transitive dependencies" or, even better but harder to setup, no category at all (but removing a category create a dumb "Uncategorized" category....)
Good point! I will see what I can achieve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created eclipse-tycho/tycho#898
Until this is resolved we should stick to include
then, that's the version we have build, tested and veted our build and I don't see a value to take additional effort to move that around as it is a requirement of the pde feature and not of m2e in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The benefit is that it doesn't require a rebuild of the feature to update the version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as the feature and the bundle are part of the same build I don't see an issue here and otherwise I see the risk that p2 won't update the version as nothing is changed (neither feature nor bundle).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a dedicated category like "Transitive dependencies" or, even better but harder to setup, no category at all (but removing a category create a dumb "Uncategorized" category....)
I removed the category
elements so that they are uncategorized and in my local test build they were included.
But I cannot judge how sever Christophs suspected risk is. But I can test locally if an update of an uncategorized bundle in the repo that is not included in any feature works or not. Of course that would only be for one case. Maybe there are other cases.
I agree with Mickael that we should not just bump all versions for the sake of having the same base. |
d8f365b
to
ea6b5f5
Compare
is this solved now or still an issue? |
@HannesWell do we still need this or should we close the PR? |
Thanks for the reminder. The main motivation to remove the deps from the feature is to avoid the forced-qualifier update of the feature if the dependency changes. |
Can't we just keep the bundles in the feature for now but still upgrade to latest version + package imports? I'm working on a feature in Tycho that will allow us to use Requirements with a version range, that should then make the version bumps unnecessary. |
OK lets to that then.
Sounds interesting. For requirements of a feature or included Plug-ins/Features? Isn't the cause of the problem that the baseline replacement of the p2e-metadata plugin replaces the feature from the reactor (with the new version of the included dependency) with the feature from the baseline (with the old version of the dep) because no qualifier update happend? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, do we need to update the target for the latest version of BND?
Thanks. Nope that was done already with #772 :) |
Requirements, see eclipse-tycho/tycho#898
Actually the problem is more that the feature has a fixed version, but Requirements can have version ranges. |
We should use Import-Package to reference the bnd.lib packages and not require the bundle. It was suggested explicitly in #445 but it is OSGi best-practice in general.
Furthermore the
bnd.lib
bundles should not be included into them2e.pde-feature
to simplify updates that do not require to touch that feature. P2 had the same problem with sat4j and PDE with ASM. And it is P2's job to collect dependencies not ours.We only have to make sure the bnd.lib dependencies are contained in the m2e repo because nobody else contributes it to SimRel otherwise.
But this is better done in the m2e.repository/category.xml, than in the feature (which I assume was the reason to include it). The category.xml is not bound to a specific version (in contrast to the feature), so this shift is a simplification.