Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Some random thoughts after browsing the e4 code base

Tom



e4-dev-bounces@xxxxxxxxxxx wrote on 07/22/2009 09:53:20 AM:

> From:

>
> Kevin McGuire <Kevin_McGuire@xxxxxxxxxx>

>
>
> > 2. Why are you still using Require-Bundle in almost every bundle when a
> > I-P would do just fine? And then the CSS core bundle is requiring the
> > batik bundle which it does not use one class from, does it?
>
> In the CSS case, we do actually reference one of the classes but
> through reflection.  The use of reflection is legacy issue wrt. the
> way the code was structured in its previous project (TK-UI),
> allowing a number of different engines to be pluged in, but TK-UI
> was not OSGi based.  
>
> WRT Require-Bundle vs. I-P, I tend to use Require-Bundle, well to be
> honest, because that's what we always do. I've seen some of the pro/
> con discussions, this is something definitely worth discussing post
> 0.9 as a general e4 architectural decision.
>

In my opinion the major inhibitor for using Import-Package is versioning.  No one should ever use Import-Package for an unversioned package.  There is no API contract behind an unversioned package and you have no idea what you will actually get.  There have been many discussions on this topic but the fact remains that if we want to allow Import-Package to be used correctly then we have a heck of a lot more versioning to do with our API packages.  Currently most Eclipse bundles only version at the bundle level and API contracts are expressed and consumed by the bundle version.

Tom


Back to the top