You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (Commented) (JIRA)" <ji...@apache.org> on 2012/03/02 15:53:58 UTC

[jira] [Commented] (FELIX-3370) Complex Require-Bundle resolver failure

    [ https://issues.apache.org/jira/browse/FELIX-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220971#comment-13220971 ] 

Richard S. Hall commented on FELIX-3370:
----------------------------------------

I see nothing in your description that indicates this is a bug. It is completely valid to wire E to be.

The priority decisions for candidates are made on a per bundle basis, not on a global basis. In other words, the best candidate for resource for E is B, assuming it was installed first, since there is no other version information.

Perhaps you really meant to file an RFE that indicates you wish that candidates for all requirements were somehow globally optimized in general. Currently, only "uses" constraints impact multiple-bundle candidate choices. However, I doubt that implementing some form of further global optimization would not be a good idea since "uses" constraints already make the algorithm slow and complicated enough. What you are unknowingly proposing is adding some form of implicit "uses" constraint where you try to pick the same candidate for everyone if you can, even though you are not really constrained to do so.

So, unless I'm missing something, this should be closed as "NOT A PROBLEM" or "WON'T FIX".
                
> Complex Require-Bundle resolver failure
> ---------------------------------------
>
>                 Key: FELIX-3370
>                 URL: https://issues.apache.org/jira/browse/FELIX-3370
>             Project: Felix
>          Issue Type: Bug
>            Reporter: Thomas Diesler
>
> Consider this
> {code}
>         // Bundle-SymbolicName: requirebundleB
>         // Export-Package: resources
>         
>         // Bundle-SymbolicName: requirebundleC
>         // Export-Package: resources
>         
>         // Bundle-SymbolicName: requirebundleD
>         // Import-Package: resources;bundle-symbolic-name=requirebundleC
>         // Bundle-SymbolicName: requirebundleE
>         // Require-Bundle: requirebundleD
>         // Import-Package: resources
>         Wiring wiringE = getWiring(env, resourceE);
>         assertEquals(0, wiringE.getProvidedResourceWires(null).size());
>         assertEquals(1, wiringE.getRequiredResourceWires(WIRING_PACKAGE_NAMESPACE).size());
>         wire = wiringE.getRequiredResourceWires(WIRING_PACKAGE_NAMESPACE).get(0);
>         assertEquals(resourceC, wire.getProvider());
> {code}
> The current implementation of the standalone resolver wires E to B

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira