Adding an umbrella to deps

I haven’t found any information about adding an Umbrella app to another apps dependencies. I have a core app that I’d like to add each other teams umbrella apps to. This way each team can maintain their own umbrella and development pipeline. When they are ready to promote their app to the core app we’d like to increment the version of their umbrella to the core app. The core app is not an umbrella.

Maybe like this?

[
  {:phoenix, "~> 1.2.1"},
  {:phoenix_pubsub, "~> 1.0"},
  {:phoenix_html, "~> 2.6"},
  {:phoenix_live_reload, "~> 1.0", only: :dev},
  {:gettext, "~> 0.11"},
  {:cowboy, "~> 1.0"},
  
  # Additional 
  {:guardian, "~> 0.14.0"},
  {:comeonin, "~> 2.6"},
  
  # Umbrella
  {:go_base_db, in_umbrella: true},
  {:go_game, in_umbrella: true},
  {:chat, in_umbrella: true}
]
1 Like

An umbrella project by itself is not considered an app and thus cannot be added to other apps as a dependency.

Could you explain your use case a bit more; you want the core app to depend on umbrella projects? Why?

A common approach would be to have all teams work in the same umbrella project; some apps will depend on common apps and some will be completely isolated. And each team can “own” (and separately deploy) a given subset of apps. Sort of like google/facebook/etc monorepo. If you need stronger boundaries between teams going with separate umbrella projects is an option too.

1 Like

I thought this would be the setup if go_base_db, go_game, and chat were members of the core app’s umbrella.

I am providing a core CLI toolkit. The core module won’t change too much. Each of the submodules can be written by any other team. My original concept was to have the tools team have and maintain an umbrella with the option for other teams to write modules outside of the umbrella that we can add to the dependency list. We are trying to not have a monolithic code repository. What I am looking to do is have something like.

...
# core_cli_app.git/mix.exs
  defp deps do
    [
     {:loki, "~> 1.2.2"},
     {:credo, "~> 0.7", only: [:dev, :test]},
     {:optimus, "~> 0.1.0"},
     {:httpoison, "~> 0.11.1"},
     {:poison, "~> 3.0"},
     {:ex_doc, "~> 0.14", only: :dev, runtime: false},
     {:teamcity_exunit_formatter, "~> 0.3.0", only: :test, runtime: false},
     {:mix_test_watch, "~> 0.3", only: :dev, runtime: false},
     {:qa_teams_umbrella},
     {:devops_teams_umbrella},
    ]
  end

...
# qa-team.git/mix.exs
  defp deps do
    [ #somdeps
      # Umbrella
      {:go_base_db, in_umbrella: true},
      {:go_game, in_umbrella: true},
      {:chat, in_umbrella: true}
    ]
  end

...
# devops-team.git/mix.exs
  defp deps do
    [ #somdeps
      # Umbrella
      {:foo_base_db, in_umbrella: true},
      {:bar_game, in_umbrella: true}
    ]
  end

Sorry, my answer does not fit your question… :frowning:

I didn’t realize you wanted umbrella of umbrellas

Umbrellas cannot be used as dependencies. They aren’t real applications, and only applications can be dependencies.

1 Like