Closed ptziegler closed 2 months ago
To briefly explain why this error shows up:
The API tool / PDE depends on the value returned by BundleDescription.getExecutionEnvironments()
. When a bundle uses the Require-Capability
but not the Bundle-RequireExecutionEnvironment
header, this method returns an empty array.
The question is whether this should be fixed in PDE or in Equinox.
Given the documentation of this method, I believe that this behavior is wrong:
/**
* Returns the list of execution environments that are required by this bundle.
* Any one of the listed execution environments will allow this bundle to be
* resolved.
*
* @since 3.2
* @return the list of execution environments that are required.
*/
public String[] getExecutionEnvironments();
@ptziegler please take into consideration that this is
Require-Capability
was adoptedso if you can fix it at Equinox, go for it there is not much that can get worse here, if its too hard and there is a quick-path at API tools do it but be aware that maybe other places call this method that the needs this fix as well.
FYI. I think the require capability can express a much more complex constraint than simply a list of EE. In any case, the list that PDE creates for this header really needs to match what equinox does for that same header.
Yes effectively you need a list of EEs that you can match against the req-capability...
This is something that can be seen in the GEF workspace whenever we start a new release. A change in execution environment is reported for each bundle, even though the BREE hasn't been changed.
In short: The baseline bundles don't contain a
Bundle-RequiredExecutionEnvironment
header, but only aRequired-Capability
header.Related to https://github.com/eclipse-equinox/equinox/issues/643