I have an umbrella application with 2 apps inside
The first one
defp deps do
[{:postgrex, "~> 0.13.1"},
{:ecto, "~> 2.1"},
{:ecto_enum, "~> 1.0"},
{:scrivener_ecto, "~> 1.1"},
{:timex_ecto, "~> 3.0"},
{:poison, "~> 2.0", override: true},
{:httpoison, "~> 0.11.1"},
{:timex, "~> 3.0"},
{:oauth2, "~> 0.8.0"},
{:ueberauth, "~> 0.4.0"},
{:ueberauth_facebook, "~> 0.6.0"},
{:guardian, "~> 0.14.2"},
{:guardian_db, "~> 0.8.0"},
# TESTING
{:ex_machina, "~> 2.0", only: :test}]
end
and the second one
# web interface
defp deps do
[{:app_name, in_umbrella: true},
{:phoenix, "~> 1.2.0"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.2"},
{:phoenix_html, "~> 2.6"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"},
{:ja_serializer, "~> 0.12.0"},
{:poison, "~> 2.0"}]
end
The first concerned I have is, How to manage duplicated packages? Specially focused on the versioning
.
The both should keep the same version like poison ~> 2.0
but even that, who should actually manage that? Specially when phoenix
forced me to downgrade
my poison
version because it have to be <2.0
.
Also, if some package already have some module. Should I include that module anyway in my deps
? For example. phoenix
already need poison
so I technically dont need poison
listed on my deps
right?!
The other concern is that I have ueberauth
outside of my web interface
app because I need configurations from it, because my session
managment live inside the other app.
So,
How do I handle duplicated configurations? Example
config :ueberauth, Ueberauth,
providers: [
facebook: {Ueberauth.Strategy.Facebook, [
profile_fields: "id,email,name,first_name,middle_name,last_name,birthday,gender,location,about,website,link",
default_scope: "email,public_profile"
]}
]
Can I use umbrella_project/config/config.ex
file for actually configure the apps
there?
It will be helpful if you could share your knowledge and experience in how you deal with such of situations. Right now is not a big deal but I am wondering what would happen once the application grow.