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:
parent
12c0d888b1
commit
c718cbbd9f
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user