[ 
https://issues.apache.org/jira/browse/IVY-663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xavier Hanin resolved IVY-663.
------------------------------

    Resolution: Fixed

I've just committed a fix for this, but it slightly changes the way circular 
dependencies are handled, we may have to discuss that further.

The problem is that for the moment we consider we have a circular dependency as 
soon as we find the same module id twice in the visit path. It means this 
happens before any conflict resolution is done, therefore letting no chance to 
a conflict manager to deal with the problem. I haven't actually changed this 
yet, I've only delayed the moment when isCircular is checked by the 
ResolveEngine to know if it has to continue the graph visit. But I'm wondering 
if we shouldn't delay the whole circular dependency check (including the call 
to CircularDependencyStrategy) to the moment we have twice the same 
ModuleRevisionId in the path, and not only ModuleId. We should still handle the 
case of the module currently resolved specifically, but I think it makes sense 
to say that #A;1->#B;1->#A;2 is not a circular dependency (this can only happen 
with a conflict manager accepting multiple revisions of the same module).

Thoughts?

> latest compatible conflict manager fails with circular dependencies and 
> dynamic revision
> ----------------------------------------------------------------------------------------
>
>                 Key: IVY-663
>                 URL: https://issues.apache.org/jira/browse/IVY-663
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta-1
>            Reporter: Xavier Hanin
>             Fix For: 2.0.0-beta-2
>
>
> Adding this test case to LatestConpatibleConflictManagerTest fails:
> {code}
>     public void testCompatibilityResolveCircularDependency3() throws 
> Exception {
>         fixture
>             .addMD("#A;1->#B;2")
>             .addMD("#C;1->#B;1")
>             .addMD("#C;2->#B;2")
>             .addMD("#C;3->#B;3")
>             .addMD("#B;1->#C;latest.integration") // circular dependency
>             .addMD("#B;2->#C;latest.integration") // circular dependency
>             .addMD("#B;3->#C;latest.integration") // circular dependency
>             .init();
>         resolveAndAssert("#A;1", "#B;2, #C;2");
>     }
> {code}

-- 
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