Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Should OSGi bundles always export all packages?

That advice is too broad. A bundle should export the package which are its API. That is, the packages which users of the bundle need access to in order to use the bundle. Packages which are implementation detail should not be exported to properly encapsulate implementation detail. Some bundles will export no packages since they are pure implementation. Some bundle are pure API and thus will export all packages. But it is not true that all bundles should export all packages.
 
If every bundle exports all packages, then where is any modularity and encapsulation of implementation detail?
--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargrave@xxxxxxxxxx
 
 
----- Original message -----
From: Lars Vogel <lars.vogel@xxxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] [equinox-dev] Should OSGi bundles always export all packages?
Date: Mon, Dec 2, 2019 10:31
 
Hi OSGi experts,

In one of the Eclipse releases a warning was activated that a plugin
must  exports all its packages. It is possible to change this for a
workspace but IMHO this new default is wrong.

Plug-ins should not always export all packages as IMHO this defies the
purpose of a good module system. Internal stuff should be hidden.

Can you clarify what the OSGi recommended way is? See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=544977

Best regards, Lars

--
Eclipse Platform project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com 
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/equinox-dev
 


Back to the top