mirror of https://github.com/sbt/sbt.git
make cycles in the graph more visible
This commit is contained in:
parent
0c4bc73a64
commit
a82235e813
|
|
@ -30,7 +30,7 @@ object AsciiTreeLayout {
|
|||
else s
|
||||
def toAsciiLines(node: A, level: Int, parents: Set[A]): Vector[String] =
|
||||
if (parents contains node) // cycle
|
||||
Vector(limitLine((twoSpaces * level) + "#-" + display(node)))
|
||||
Vector(limitLine((twoSpaces * level) + "#-" + display(node) + " (cycle)"))
|
||||
else {
|
||||
val line = limitLine((twoSpaces * level) + (if (level == 0) "" else "+-") + display(node))
|
||||
val cs = Vector(children(node): _*)
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class AsciiTreeLayoutSpecs extends Specification {
|
|||
| | | +-3
|
||||
| | |\u0020
|
||||
| | +-5
|
||||
| | #-1
|
||||
| | #-1 (cycle)
|
||||
| | +-4
|
||||
| | | +-3
|
||||
| | |\u0020
|
||||
|
|
|
|||
Loading…
Reference in New Issue