Bug 483092 - Require-Bundle with not version is resolved with 2 different versions
Summary: Require-Bundle with not version is resolved with 2 different versions
Status: RESOLVED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: equinox.compendium-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2015-11-26 08:38 EST by Sébastien Gandon CLA
Modified: 2019-07-20 12:02 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Gandon CLA 2015-11-26 08:38:06 EST
We are using Eclipse 4.3 to build our RCP application.
we have 2 bundles (bundleA and bundleB) that have the following required bundle in their manifest.

    Require-Bundle : org.apache.commons.logging

This was made with no version on purpose.
In our RCP app we have 3 versions of this apache bundle (1.0.4, 1.1.1, 1.2).
When equinox resolves these dependencies bundleA will depend on 1.1.1 and bundleB will depend on 1.2.
According to OSGI spec when not specifying the version it should be considered as [0.0.0,∞), meaning it should use the latest version.
---
page 79 of the OSGI core spec :
bundle-version
 - The value of this attribute is a version range to select the bundle version of the
required bundle. See Version Ranges  on page 36. The default value is [0.0.0,∞)
---
To make sure there where no other requirement that may resolve to different versions I have uninstalled the version 1.1.1 with the osgi console.
When launching the app, both bundle eventually resolve to the 1.2 version.
So I think this may be a bug.
Comment 1 Thomas Watson CLA 2015-12-01 13:49:46 EST
Can you tell us if the bundles involved are installed and resolved in different 'stages'.  I ask because the framework also should prefer previously resolved providers over currently unresolved providers.  This can influence the selection in such a way that an earlier resolved version is wired to for some bundles, but then when later bundles are installed and resolved they get wired to a later version of the bundle.
Comment 2 Eclipse Genie CLA 2019-07-20 10:57:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.