My app works fine alone, however, if I tried to run it within an umbrella setup, I get an error:
here is what I did: (at the root of umbrella folder)
mix local.rebar
rm -rf deps
rm -rf _build
mix deps.get
iex -S mix phoenix.server
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
===> Compiling pooler
===> Compiling src/pooler_starter.erl failed
src/pooler_starter.erl:34: export_all flag enabled - all functions will be exported
** (Mix) Could not compile dependency :pooler, "/Users/samir/.mix/rebar3 bare compile --paths "/Users/samir/Documents/projects/elixir/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile pooler", update it with "mix deps.update pooler" or clean it with "mix deps.clean pooler"
although I can start it if I run the commandiex -S mix phoenix.server at the app folder itself.
here is the mix.exs of the umbrella main app:
defmodule TrackwareProjects.Mixfile do
use Mix.Project
def project do
[apps_path: "apps",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
defp deps do
[]
end
end
the config.exs of the umbrella main app:
use Mix.Config
import_config "../apps/*/config/config.exs"
Is there something in your global configuration that treats warnings as errors? Perhaps some overrides in a .iex file, as it seems to work when you not use iex…
As you can see here, for some reason warnings are treated as errors here. Now we need to find out why this happens in the umbrella but not in the sub-app.
Can you compare the output (especially configscript- and preehook-pathes) when doing the same in the sub-app? Of course you need to mix clean pooler there first.