-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an equinox.api bundle #711
base: master
Are you sure you want to change the base?
Conversation
Currently we have usually have bundles that are mixed with API and implementation, even worse those also consists of split packages, most notable the 'org.eclipse.core.runtime' package that makes it hard to use the API independent from the implementation and to not break existing usages it is not easily possible to improve the situation because of the widely use of require bundle in eclipse. Also we do not even have good API check support for exported packages and split-packages in general what has caused problems in the past. This now tries to improve the situation in the following way: - add a new equinox.api bundle that host the actual API - require-bundle it on the old places with reexport to ensure backward compatibility - add tycho-baseline-mojo to check for package version consistency according to semantic-versioning As a result, previous consumers of org.eclipse.equinox.common and org.eclipse.equinox.registry can now safely use import-package instead allowing for easy replacement of the API if desired.
A bold move and a great one. Would also be nice to have a way to deprecate the usage of the old export, so that users see that they should adjust there dependencies. |
Bundle-Name: %pluginName | ||
Bundle-SymbolicName: org.eclipse.equinox.api | ||
Bundle-Version: 1.0.0.qualifier | ||
Export-Package: org.eclipse.core.runtime;version="3.7.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume some attributes will be needed. I'm not sure if other importers will need to change?
No the goal is to have one package without mandatory attributes so users that want to reference the new api exported package do not need to specify anything and old users (that use an attribute) get the one as before.
Actually we then can replace all these special imports with regular ones.
I don't see how this approach achieves the goals. Is the goal have a single bundle that exports all the parts of If we want to do this then I suggest moving all the parts of the But that all seems very much an academic exercise that I see not solving any real problem (much like the original notion of splitting We would still need to provide the "parts" bundles like equinox.common and equinox.registry, but they would be shell bundles that simply require the core.runtime bundle and export the facade "part" of the |
Yes in the end there should only be one
In general yes, but I don't see how it would be possible to break exiting users that e.g. currently require-bundle equinox-common. Therefore my idea was to create a new bundle.
The problem is more that the implementation have very specific structure and especially the
is something that really make things worse, so I don't see how to make this ever go away an have a "clean" And as the package contains some very basic interfaces (e.g. IProgressMonitor and/or CoreException) this is pulled in almost everywhere. And this is for example also mentioned here that people like to substitute the real bundle/api: |
Currently we have usually have bundles that are mixed with API and
implementation, even worse those also consists of split packages, most
notable the 'org.eclipse.core.runtime' package that makes it hard to use
the API independent from the implementation and to not break existing
usages it is not easily possible to improve the situation because of the
widely use of require bundle in eclipse. Also we do not even have good
API check support for exported packages and split-packages in general
what has caused problems in the past.
This now tries to improve the situation in the following way:
compatibility
according to semantic-versioning
As a result, previous consumers of org.eclipse.equinox.common and
org.eclipse.equinox.registry can now safely use import-package instead
allowing for easy replacement of the API if desired.