I have an umbrella project who’s structure looks like this:
apps - app1 - app2 - app3
app2 and app3 both have app1 as a dependency, marking them with
When I cd to
apps/app2 and run
mix test or
mix cmd --app app2 mix test from the umbrella root, I see the following error:
warning: redefining module App1.MixProject (current version defined in memory) /Users/mpope/application/apps/app1/mix.exs:1 Error while loading project :app1 at /Users/mpope/application/apps/app1 Error while loading project :app1 at /Users/mpope/application/apps/app1 ** (CompileError) /Users/mpope/application/apps/app1/mix.exs:1: cannot define module App1.MixProject because it is currently being defined in /Users/mpope/application/apps/app1/mix.exs:1 (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6 (stdlib) erl_eval.erl:126: :erl_eval.exprs/5
I have tried to google for this issue and look through the github issue list but I can’t find anything relating to this. I can create a sample app and push it up to github if I am not providing enough context.
Elixir version below:
Erlang/OTP 21 [erts-10.2.5] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace] Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help) iex(1)>
Thank you very much!
Note, edited the title for clarity.