Updates:
Status: Invalid
Comment #1 on issue 532 by mcculls: OSGI exported package version
inconsistent with bundle version
http://code.google.com/p/google-guice/issues/detail?id=532
Firstly this is *not* an error or a mistake, it is a deliberate versioning
policy that many other third-party OSGi and specification libraries use.
OSGi lets you version packages separately to the bundle version. This is
very useful because you can then use package versions to declare
compatibility between releases while still using the bundle version to mark
major releases.
For example, Guice 1 and Guice 2 were major milestones, but the exported
API is still compatible: you can take an application written against Guice
1 and use it with Guice 2. This compatibility is expressed in the *package*
versions, according to the scheme suggested by the OSGi Alliance:
major.minor.micro
major = breaking change
minor = new feature, but still compatible
micro = small bug fix, still compatible
And this should continue with the next release - the expected package
export version for Guice 3 will be 1.3, because the primary API is still
compatible with Guice 1.
This scheme makes it very easy for you to add version checks on your
imports.
For example say you tested your application with Guice 1, but wanted to
allow the client to use any later release that's still compatible with
Guice 1. To do this you can simply use an import version range of "[1, 2)".
And if you tested with Guice 2, but wanted to allow later compatible
releases you can use a range of "[1.2, 2)". ie. match any package version
from 1.2 (inclusive) up to the next breaking/incompatible change.
You couldn't do this if the package version was tied to the bundle version
- we'd have to bump up the package version on every release even if the
exported API didn't change, and you'd have no guarantee which API version
is compatible with another. (Your client bundle would effectively end up
tied to a single release of Guice.)
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.