[ 
https://issues.apache.org/jira/browse/MRESOLVER-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17689089#comment-17689089
 ] 

ASF GitHub Bot commented on MRESOLVER-316:
------------------------------------------

cstamas opened a new pull request, #244:
URL: https://github.com/apache/maven-resolver/pull/244

   When resolving artifact from issue, the DF collector enters endless loop. 
But the loop is NOT in collecting, it happens when DF detect unsolvable 
problem, and tries to report it. To report it, it needs to visit the graph of 
collected nodes, but that graph contains loops (and it is expected).
   
   But, the problem is that PathRecordingDependencyVisitor used to collect 
paths chokes on loops.
   
   Fix: just like in RepositorySystem#resolveDependencies, wrap up the graph 
visitor into TreeDependencyVisitor, that creates tree-like (loopless, tree by 
def) "view" of graph.
   
   With this fix, DF immediately detects that artifact in issue is unresolvable 
(just like BF does), as it contains unsolvable (not intersecting) ranges.
   
   ---
   
   https://issues.apache.org/jira/browse/MRESOLVER-316




> DF collector enters endless loop when collecting 
> org.webjars.npm:musquette:1.1.1
> --------------------------------------------------------------------------------
>
>                 Key: MRESOLVER-316
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-316
>             Project: Maven Resolver
>          Issue Type: Bug
>          Components: Resolver
>            Reporter: Tamas Cservenak
>            Priority: Major
>             Fix For: 1.9.5
>
>
> When collecting {{org.webjars.npm:musquette:1.1.1}} the DF collector (the 
> default one) enters endless loop.
> The new BF collector immediately spits out error:
> {noformat}
> Could not resolve version conflict among 
> [
>  org.webjars.npm:musquette:jar:1.1.1 -> 
>    org.webjars.npm:minimist:jar:[0.2.1,0.3), 
>  org.webjars.npm:musquette:jar:1.1.1 -> 
>    org.webjars.npm:mqtt:jar:[3.0.0,4) -> 
>      org.webjars.npm:commist:jar:[1.0.0,2) -> 
>        org.webjars.npm:minimist:jar:[1.1.0,2), 
>  org.webjars.npm:musquette:jar:1.1.1 -> 
>    org.webjars.npm:mqtt:jar:[3.0.0,4) -> 
>      org.webjars.npm:minimist:jar:[1.2.0,2)
> ] {noformat}
> To reproduce: just run demo snippet 
> org.apache.maven.resolver.examples.GetDependencyTree and change artifact ctor 
> to have string {{"org.webjars.npm:musquette:1.1.1"}} as input...
> Reported as part of PR https://github.com/apache/maven-resolver/pull/236



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to