do not connect references from destroy nodes

Destroy nodes only require their own state to evaluate. Do not connect
any of their references in the graph.
This commit is contained in:
James Bardin 2019-12-03 13:13:50 -05:00
parent 47a16b0937
commit 45f2a61bdb
1 changed files with 6 additions and 0 deletions

View File

@ -80,6 +80,12 @@ func (t *ReferenceTransformer) Transform(g *Graph) error {
// Find the things that reference things and connect them
for _, v := range vs {
if _, ok := v.(GraphNodeDestroyer); ok {
// destroy nodes references are not connected, since they can only
// use their own state.
continue
}
parents, _ := m.References(v)
parentsDbg := make([]string, len(parents))
for i, v := range parents {