On Mon, Sep 21, 2015 at 12:05 PM, Jason Bailey <[email protected]> wrote:

> I'm a bit confused by the use case.
>
> Breakage should only occur if the bundle is exporting an API that is
> versioned, and you have a bundle that is explicitly set to not accept the
> new package version.
>
> Or is the breakage somewhere else?
>

Continuing on the example here for google's guava, guava-17.0.jar exports
its packages with versions of "17.0.0"
With commonly used tools such as bnd, by utilizing one of these packages
(let's say the "com.google.common.io" package for driving the example), the
resulting manifest (by default) will have an import package declaration of '
com.google.common.io; version="[17.0,18)"'
This is due to the expectation of practical semantic versioning.

In guava-18.0.jar, the packages are exported with versions of "18.0.0"
So in this scenario where guava 17 is "updated" to 18 within OSGi (instead
of 18 appearing as a new bundle), such bundles will now fail to
wire/resolve due to 'com.google.common.io; version="[17,18)"' now no longer
being available within the system.

Yes, the import declaration can be specifically set when building to
something such as "[17.0, 19)", but not only does this start opening
unnecessary risk (is there any real guarantee 18 will work?),
this workaround really only applies to the bundles we control (create)
ourselves. That is, this workaround can not be particularly applied to
already existing (other 3rd party) bundles.


An "updating-only" paradigm primarily defeats one of the key points of OSGi
where multiple versions of the same packages are meant to be able to
simultaneously exist "in harmony".
Felix does support properly support the scenario of having multiple
versions of the same packages, though so far I've only been able to achieve
it so far within the gogo shell (the Web Console does not support this
scenario properly yet it seems from the looks of FELIX-4142).

So primarily looking for clarification if the JcrInstaller can support this
(through the underlying OsgiInstaller framework Sling has), and how to
utilize this functionality if it does.

-Steven

Reply via email to