Warn on cyclic modules dependencies
This commit is contained in:
parent
12c0d888b1
commit
c718cbbd9f
|
@ -111,7 +111,14 @@ sort_modules(Host, ModOpts) ->
|
||||||
[DepMod, Mod]);
|
[DepMod, Mod]);
|
||||||
{DepMod, DepOpts} ->
|
{DepMod, DepOpts} ->
|
||||||
digraph:add_vertex(G, DepMod, DepOpts),
|
digraph:add_vertex(G, DepMod, DepOpts),
|
||||||
digraph:add_edge(G, DepMod, Mod)
|
case digraph:add_edge(G, DepMod, Mod) of
|
||||||
|
{error, {bad_edge, Path}} ->
|
||||||
|
?WARNING_MSG("cyclic dependency detected "
|
||||||
|
"between modules: ~p",
|
||||||
|
[Path]);
|
||||||
|
_ ->
|
||||||
|
ok
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end, Deps)
|
end, Deps)
|
||||||
end, ModOpts),
|
end, ModOpts),
|
||||||
|
|
Loading…
Reference in New Issue