From 0309f300eae1f4e55e4577386250e409147b8d3a Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sat, 7 Mar 2020 22:58:38 +0000 Subject: [PATCH] Fix invalid DAG clean-up deletion code THat was code written on a bus and rarely executed, but still the function called didn't exist for real. --- src/rebar_compiler_dag.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rebar_compiler_dag.erl b/src/rebar_compiler_dag.erl index 49725473..0a8f1faa 100644 --- a/src/rebar_compiler_dag.erl +++ b/src/rebar_compiler_dag.erl @@ -267,9 +267,10 @@ prepopulate_deps(G, Compiler, InDirs, Source, DepOpts, Status) -> [digraph:add_vertex(G, Src, 0) || Src <- AbsIncls, digraph:vertex(G, Src) =:= false], %% drop edges from deps that aren't included! - [digraph:del_edge(G, Source, Path) || Status == old, - Path <- digraph:out_edges(G, Source), - not lists:member(Path, AbsIncls)], + [digraph:del_edge(G, Edge) || Status == old, + Edge <- digraph:out_edges(G, Source), + {_, _Src, Path, _} <- [digraph:edge(G, Edge)], + not lists:member(Path, AbsIncls)], %% Add the rest [digraph:add_edge(G, Source, Incl) || Incl <- AbsIncls], ok.