From 3707b39fefb027d6388eefc0c0675a70f9305800 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Sun, 12 Jan 2020 16:39:32 -0500 Subject: [PATCH] engine: graph: Improve comments Clarify that we're referring to cycles in the graph, since it needs to be a DAG. --- engine/graph/autoedge/autoedge.go | 4 ++-- engine/graph/autogroup/autogroup.go | 4 ++-- engine/graph/reverse.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/graph/autoedge/autoedge.go b/engine/graph/autoedge/autoedge.go index b6fd6de2..2ceecc1b 100644 --- a/engine/graph/autoedge/autoedge.go +++ b/engine/graph/autoedge/autoedge.go @@ -90,8 +90,8 @@ func AutoEdge(graph *pgraph.Graph, debug bool, logf func(format string, v ...int } } - // It would be great to ensure we didn't add any loops here, but instead - // of checking now, we'll move the check into the main loop. + // It would be great to ensure we didn't add any graph cycles here, but + // instead of checking now, we'll move the check into the main loop. return nil } diff --git a/engine/graph/autogroup/autogroup.go b/engine/graph/autogroup/autogroup.go index de3d135d..00b5efbe 100644 --- a/engine/graph/autogroup/autogroup.go +++ b/engine/graph/autogroup/autogroup.go @@ -66,8 +66,8 @@ func AutoGroup(ag engine.AutoGrouper, g *pgraph.Graph, debug bool, logf func(for } } - // It would be great to ensure we didn't add any loops here, but instead - // of checking now, we'll move the check into the main loop. + // It would be great to ensure we didn't add any graph cycles here, but + // instead of checking now, we'll move the check into the main loop. return nil } diff --git a/engine/graph/reverse.go b/engine/graph/reverse.go index 070e0b00..862a1094 100644 --- a/engine/graph/reverse.go +++ b/engine/graph/reverse.go @@ -150,8 +150,8 @@ func (obj *Engine) Reversals() error { } // TODO: Do we want a way for stored reversals to add edges too? - // It would be great to ensure we didn't add any loops here, but instead - // of checking now, we'll move the check into the main loop. + // It would be great to ensure we didn't add any graph cycles here, but + // instead of checking now, we'll move the check into the main loop. return nil }