Tibor17 commented on a change in pull request #39: [MRESOLVER-93] - 
PathRecordingDependencyVisitor to handle 3 cycles
URL: https://github.com/apache/maven-resolver/pull/39#discussion_r316125835
 
 

 ##########
 File path: 
maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/visitor/PathRecordingDependencyVisitor.java
 ##########
 @@ -101,6 +96,7 @@ public boolean visitEnter( DependencyNode node )
     {
         boolean accept = filter == null || filter.accept( node, parents );
 
+        boolean hasDuplicateNodeInParent = parents.contains( node );
 
 Review comment:
   @suztomo
   @belingueres
   @michael-o 
   Pls see the commit `cf84cfb78f3d488a83d974f485a6551bdee20bf9`. They solved 
similar problem: 
   ```
   Bug 418250 - PathRecordingDependencyVisitor crashes on cyclic graphs  
   Made PathRecordingDependencyVisitor stop traversal upon cycle entry, also 
added test to verify NearestVersionSelector's usage of 
PathRecordingDependencyVisitor does not suffer from cycle-related issues either
   ```
   IMO `visited` are the reason of `recorder` dependency. And I think the 
reason should be to keep dependencies recorded forever of this instance life. 
The reason is that the same dependency should not be introspected together with 
its dependencies if this process was done in some previous visit.
   What do you think about it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to