[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [e4-dev] Re-exporting Require-Bundle
|
+1 for not re-exporting.
In addition to evils of re-exporting
that John and Tom described, I strongly believe that E4 UI should not leak
EMF artifacts through its APIs.
Thanks,
Oleg
Eike Stepper <stepper@xxxxxxxxxx>
Sent by: e4-dev-bounces@xxxxxxxxxxx
06/12/2009 03:20 AM
Please respond to
E4 Project developer mailing list <e4-dev@xxxxxxxxxxx> |
|
To
| E4 Project developer mailing list <e4-dev@xxxxxxxxxxx>
|
cc
| Ed Merks <ed.merks@xxxxxxxxx>
|
Subject
| Re: [e4-dev] Re-exporting Require-Bundle |
|
-1
Some time ago there was already a long discussion about re-exporting pros
and cons. Unfortunately I can't remember pointers to it.
Here my 2 cents:
IMHO it depends mostly on whether the API of the referenced bundle A is
an integral part of the API of the referencing bundle B, or not. If it
is part of the higher API, e.g. B publishes method signatures with parameter
types from A, then bundle A should be re-exported since it is a pain for
API B clients to recurse through all the non-explicit, transitive dependencies.
The question if it's a good idea to put A-types into the B-API is a separate
discussion. But I think sometimes it's convenient and sometimes it's necessary.
In this particular case it seems as if dependencies (require-bundle) on
some EMF bundles raised the issue. I know that the APIs of EMF probably
belong to the most stable ones in Eclipse. And usually code that depends
on these EMF APIs will never even want to drop this dependency. So, in
the end I think that the two the main arguments *against* re-exporting
dependencies don't count so much if we talk particularly about dependencies
on EMF ;-)
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Thomas Watson schrieb:
+1
Re-exporting is evil. I think it really dirties your bundle's API contract.
Unless you use a real brittle version range on your require-bundle constraint
you cannot be that confident that your API signature will remain constant
for a particular version of you bundle. I would almost go as far as to
say we should add a warning in PDE to flag any usage of re-export. I think
it is simply a bad practice re-export bundles. The problem is once you
have added re-export you cannot remove it without it being considered a
breaking API change. This would be equivalent to removing API from your
bundle.
Tom
John
Arthorne ---06/11/2009 04:22:57 PM---I noticed org.eclipse.e4.ui.model.workbench
re-exports a couple of EMF plug-ins. As a general reminder, re-exporting
should be
I noticed org.eclipse.e4.ui.model.workbench re-exports a couple of EMF
plug-ins. As a general reminder, re-exporting should be avoided if possible,
since it means you are essentially publishing the entire API of that other
bundle as part of your bundle, and committing to maintaining that re-exported
content indefinitely. Avoiding re-export generally gives more flexibility
to remove or refactor dependencies in the future without breaking the API
exposed by your plug-in. Does anyone know of a particular reason for the
re-exports in this case? If I don't hear back, I'll make an attempt at
fixing this to avoid re-export._______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev