25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Warn on cyclic modules dependencies

This commit is contained in:
Evgeniy Khramtsov 2016-07-07 11:34:17 +03:00
parent 12c0d888b1
commit c718cbbd9f

View File

@ -111,7 +111,14 @@ sort_modules(Host, ModOpts) ->
[DepMod, Mod]);
{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, Deps)
end, ModOpts),