diff --git a/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt b/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt index 7052804f..f6a3673f 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/DynamicGraph.kt @@ -104,6 +104,7 @@ public class DynamicGraph : KobaltLogger { * Add a node to the graph. */ public fun addNode(value: T) : T { + nodes.add(value) nodesReady.add(value) return value } @@ -113,6 +114,8 @@ public class DynamicGraph : KobaltLogger { * (they will be added by this method). Makes "to" depend on "from". */ public fun addEdge(from: T, to: T) { + nodes.add(from) + nodes.add(to) val fromNode = addNode(from) val toNode = addNode(to) dependingOn.put(toNode, fromNode) @@ -234,7 +237,7 @@ public class DynamicGraph : KobaltLogger { return result.toString(); } - val nodes : Set get() = nodesReady + val nodes = hashSetOf() fun dump() : String { val result = StringBuffer()