Resolver does not always discard partial results when a cyclically dependency 
fails
-----------------------------------------------------------------------------------

                 Key: FELIX-1422
                 URL: https://issues.apache.org/jira/browse/FELIX-1422
             Project: Felix
          Issue Type: Bug
          Components: Framework, Specification compliance
    Affects Versions: felix-1.8.1
            Reporter: Richard S. Hall
            Assignee: Richard S. Hall
            Priority: Minor
             Fix For: felix-2.0.0


When resolving dependencies among bundles, if a cycle is detected the resolver 
algorithm assumes the resolve is successful. So, assuming we want to resolve A 
and A wants to import from B and B wants to import from A, we end up building 
up a data structure where A has B as a potential candidate and B has A. If A is 
unable to resolve, then the whole thing fails and everything is fine. However, 
if the resolve starts with C and C has an optional import from A, then when A 
fails to resolve it is ignored since it was optional for C. This means the 
partial resolve results for A will be discarded, but unfortunately the partial 
resolve results for B are not. This means if C also has a dependency on B, the 
partial resolve results will be used as if they were correct, even though they 
include A as a candidate, which could not be resolved. The end result is an 
improper resolve result.

We need to remove assumptions we made about cycles if they ultimately fail to 
resolve.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to