I’m working on two Phoenix projects: A
and B
. Project B
provides an HTTP API that is utilized by project A
. Additionally, project B
implements a Util
module that project A
uses. This is accomplished by adding project B
as a dependency from GitHub to project A
.
During development, I added the following dependency to project A
:
defp deps do
[
# ...
{:a, app: false, github: "c/a", branch: "main"}
]
end
I used app: false
to prevent loading and running the application from project B
, allowing project A
to only use the Util
module from project B
.
However, when I create a release of project A
with MIX_ENV="prod" mix release
, I encounter an error when executing ./_build/prod/rel/a/bin/a start
:
(CompileError) _build/prod/rel/a/releases/0.1.0/runtime.exs:100: module RuntimeConfig is not loaded and could not be found
Upon inspecting the _build/prod/rel/a/lib
directory, I noticed that the b
dependency is missing.
What is the correct way to add project B
as a dependency to project A
for this specific use case? I would appreciate any advice or suggestions.