Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-1422

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

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              rickhall Richard S. Hall
              rickhall Richard S. Hall
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: