[erlang-questions] starting otp application dependencies

Nicolas Martyanoff khaelin@REDACTED
Wed Apr 8 12:49:16 CEST 2015


Given an OTP application with dependencies, is there a way to automatically
start these dependencies before starting the application itself, during
development ?

In production, I can create a release (using relx for example). But during
development, I compile the application with rebar, then run erl (erl -pa ebin
deps/*/ebin), then my application (application:start(App)).

Even though app(4) indicates that the 'applications' list in the app file
contains "All  applications which must be started before this application is
allowed to be started", application:start(App) does not automatically start all
dependencies of App.

This also means that indirect dependencies must be found and started manually.
Therefore if my application depends on webmachine, I have to find all the
dependencies of webmachine (and there are more than a few).

There obviously is a simpler way. A trick would be to add a function available
in erl which parse an app file and load all dependencies, but then I still
have to find all indirect dependencies.

How do you avoid these issues yourself ?

Thank you in advance.

Nicolas Martyanoff

More information about the erlang-questions mailing list