You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use the "Include required plugins automatically" option I noticed that it does seem to add more than required in some situations.
For example assume a product hat has slf4j.api and two slf4j provider implementations are in the target then PDE adds another slf4j provider even if one was already chosen in the product, I noticed that when working on
The product itself is "complete" so works with autoIncludeRequirements="false" already, no missing requirements are reported when validated. If one starts the product it is getting the expected message:
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
Now I add <plugin id="org.eclipse.equinox.slf4j"/> and logging works and I get:
id State Bundle
7 ACTIVE org.eclipse.equinox.slf4j_1.0.0.qualifier
17 RESOLVED slf4j.api_2.0.16
if now one activates autoIncludeRequirements="true" one suddenly gets
id State Bundle
6 RESOLVED slf4j.simple_2.0.16
8 ACTIVE org.eclipse.equinox.slf4j_1.0.0.qualifier
18 RESOLVED slf4j.api_2.0.16
@HannesWell can you take a look as this feature is extremely useful but might confusing in some situations like this.
The text was updated successfully, but these errors were encountered:
And IIRC the slf4j.api bundle has a (OSGi) requirement to all it's providers through the Service-Loader mediator configuration.
In this specific case the life-line that prevents a real problem is that the Aries SPI-fly service-loader mediator only considers bundles in state active, which isn't usually the case (like in your example) as long as one has not configured it as auto-started in the product configuration (at least in my use-cases this was the case).
But of course in general it would be cleaner to not have the other providers in the product at all. I wanted to add meant to filter the considered required-wires so that the DependencyManager can be used in more places in PDE.
Then the service-loader requirements could be filtered too.
If I use the "Include required plugins automatically" option I noticed that it does seem to add more than required in some situations.
For example assume a product hat has
slf4j.api
and two slf4j provider implementations are in the target then PDE adds another slf4j provider even if one was already chosen in the product, I noticed that when working onwith the product here:
The product itself is "complete" so works with
autoIncludeRequirements="false"
already, no missing requirements are reported when validated. If one starts the product it is getting the expected message:Now I add
<plugin id="org.eclipse.equinox.slf4j"/>
and logging works and I get:if now one activates
autoIncludeRequirements="true"
one suddenly gets@HannesWell can you take a look as this feature is extremely useful but might confusing in some situations like this.
The text was updated successfully, but these errors were encountered: