Description
Elixir and Erlang/OTP versions
erlang:27-alpine
elixir 1.18.1
Operating system
Inside docker containers running erlang alpine, through docker compose, overlaying the umbrella folder in a linux ubuntu 24.04 server vm
Current behavior
You can find a full reproducible repository here, with instructions and some more info:
https://github.com/mnussbaumer/mix-comp-bug
The issue is basically, when using MIX_DEPS_PATH in an umbrella project, some deps are correctly compiled to the umbrella root, while others end up each of the apps folders which then creates a new series of problems (missing modules in some cases, missing templates/js files as is this particular example, phoenix
and phoenix_live_view
js files)
Reason why I need this working:
in order to be able to use several "apps" that are independent of each other but part of the same umbrella, when developing locally, where at least two of those apps are started and running at the same time, from the same folder (in this case through docker compose overlays, that map to the same umbrella folder as the context, but it would probably happen without docker compose anyway, if you ran two shells from two terminals in the same umbrella root), I came to the point where the only solution I found was to make each "service" map its deps and build folders to independent folders, instead of using a single one as is usual.
This is because when not doing that, plenty of concurrent issues (due to apps being compiled to the same destination, and folders/files being churned through) arise, ending with mostly applications crashes (I'm talking 95%++ runs), and this solved that beautifully.
But now I'm facing this issue where somewhere, something is compiling the deps into the individual umbrella apps folder, instead of the root folder, and more mysteriously, some of the deps are not present either in the root nor the apps deps folder. I'm not entirely sure what else I can try - the repository I linked has all the instructions to set this up locally with docker and further info and context.
It seems that somewhere in the compile chain it's not asking if it's inside an umbrella or not and defaulting to the mix project of the individual app, instead of the umbrella.
Expected behavior
Using MIX_DEPS_PATH in an umbrella compiles deps to the right folder (in the root) always and all deps are properly compiled and protocols properly consolidated.