Where to declare dependencies in umbrella apps

I have an umbrella app currently composed of three applications: Core, Api and Web. Both Web and Api depend on the Core application.

I want to add the dialyzer library to my project, but I don’t know where to put it. My options are:

  • Declare the dependency in the root mix.exs file.
  • Declare the dependency in the mix.exs file of the Core application.

I prefer the second option, but I don’t really know if it is the best one. Since both Web and Api depend themselves on Core, they could also use dialyxir.
What do you think?

3 Likes

Hi,

From my point of view dependencies which are used global will stay in global mix.exs file, you can put dialyzer and credo for example there.

If you are using Core, API separately make sense to add dialyzer as dependency in apps from umbrella

3 Likes

Looks allright!
Thanks!

1 Like