I have been seeing some weird and intermittent errors in my Umbrella applications lately (like Phoenix instrumenters from one umbrella child app trying to info a Phoenix instrumenter from another umbrella child app)
But first thing - shouldn’t this work?
App1 's mix.exs
defp deps do
[
...
{:app2, in_umbrella: true},
...
]
end
App2 's mix.exs
defp deps do
[
...
{:app1, in_umbrella: true},
...
]
end
It is currently causing ** (Mix) Could not sort dependencies. There are cycles in the dependency graph - even if the the child apps do not have any of the same deps.
The beam starts applications in the order the dependency tree requires and circular dependencies break the ability to do so. App1 would need App2 to be started first, while App2 would need App1 to be started first.
If I remove one dependency, you will get a warning. In my case:
warning: AutobaseWeb.Endpoint.broadcast!/3 defined in application :autobase_web is used by the current application but the current application does not depend on :autobase_web. To fix this, you must do one of:
If :autobase_web is part of Erlang/Elixir, you must include it under :extra_applications inside “def application” in your mix.exs
If :autobase_web is a dependency, make sure it is listed under “def deps” in your mix.exs
In case you don’t want to add a requirement to :autobase_web, you may optionally skip this warning by adding [xref: [exclude: [AutobaseWeb.Endpoint]]] to your “def project” in mix.exs