Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
framework-1.8.1
-
None
Description
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 NPE when creating wires, since it tries to create a wire to an unresolved bundle.
We need to remove assumptions we made about cycles if they ultimately fail to resolve.
Attachments
Issue Links
- relates to
-
FELIX-1710 Resolver still does not discard all partial results when a cyclical dependency fails
- Closed