Closed sleekweasel closed 8 years ago
You are correct about the redundancy of visiting the children of the same node more than once. I merged your fix.
However, I cannot reproduce a situation with an infinite recursion.
Can you please give me an example for a build.gradle
that causes such infinite recursion?
Version 1.2.1 introduces the optional command-line parameter --no-repeat
which can be added to taskTree
to prevent printing the same sub-tree more than once.
Since gradle does not allow circular task dependencies, and since I don't see how this issue can be reproduced, I decided to leave printing all dependencies (including repetitions) as the default behavior. As far as I can tell, and I would appreciate being proven wrong, this should never cause an infinite recursion.
I left this running during dinner and my poor computer was churning out an infinite tree when I returned!
Can I suggest that it marks a task as 'explored' as soon as its starts printing its dependencies, and doesn't descend into it if it's already marked as such?
Cheers!