Ivy
  1. Ivy
  2. IVY-1455

IllegalStateException w/ version overrides only when resolving for multiple confs

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0-RC1
    • Component/s: None
    • Labels:
      None

      Description

      A variant of IVY-1333 is possible with some interesting properties:

      • Mediations having an effect on resolution (presence being necessary to trigger the issue in question) even when no children of the descriptors to which they apply match their specifiers.
      • IllegalStateException only triggering when multiple confs are resolved in a single pass.

      See attached reproducer. Using same, the exception excerpted below is thrown:

      [ivy:resolve] :: resolving dependencies :: reproducer#top-level;working@duffy
      [ivy:resolve]   confs: [master, with-direct-dep, without-direct-dep]
      [ivy:resolve]   found reproducer#phase-one;1 in testcase
      [ivy:resolve]   found reproducer#phase-two;1 in testcase
      [ivy:resolve]   found empty-module#empty-module;1 in testcase
      [ivy:resolve]   found conflict#conflict;2 in testcase
      [ivy:resolve] 
      [ivy:resolve] :: problems summary ::
      [ivy:resolve] :::: ERRORS
      [ivy:resolve]   impossible to get artifacts when data has not been loaded. IvyNode = conflict#conflict;1
      [ivy:resolve] 
      [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
      
      BUILD FAILED
      /home/duffy/tmp/IVY-1455-repro/build.xml:29: impossible to resolve dependencies:
              java.lang.IllegalStateException: impossible to get artifacts when data has not been loaded. IvyNode = conflict#conflict;1
              at org.apache.ivy.core.resolve.IvyNode.getArtifacts(IvyNode.java:809)
              at org.apache.ivy.core.resolve.IvyNode.getSelectedArtifacts(IvyNode.java:786)
              at org.apache.ivy.core.report.ResolveReport.setDependencies(ResolveReport.java:240)
              at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:235)
              at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:195)
              at org.apache.ivy.Ivy.resolve(Ivy.java:507)
      

        Activity

        Hide
        Charles Duffy added a comment -

        Frankly, I'd appreciate some assistance on this one from someone more familiar with the ResolveEngine's logic.

        Show
        Charles Duffy added a comment - Frankly, I'd appreciate some assistance on this one from someone more familiar with the ResolveEngine's logic.
        Hide
        Charles Duffy added a comment -

        Spent some quality time with a debugger tracing execution.

        In turns out that mediations (such as overrides) were being applied based on the location in the tree where a conflict was detected, not the location in the tree where an item was actually defined.

        r1553745 fixes the test case given here.

        Show
        Charles Duffy added a comment - Spent some quality time with a debugger tracing execution. In turns out that mediations (such as overrides) were being applied based on the location in the tree where a conflict was detected, not the location in the tree where an item was actually defined. r1553745 fixes the test case given here.

          People

          • Assignee:
            Charles Duffy
            Reporter:
            Charles Duffy
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development