[erlang-questions] starting otp application dependencies

Sergej Jurečko sergej.jurecko@REDACTED
Wed Apr 8 13:43:31 CEST 2015


application:ensure_all_started(app).

Sergej
On Apr 8, 2015 1:41 PM, "Nicolas Martyanoff" <khaelin@REDACTED> wrote:

> Hi,
>
> 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
> http://wandrian.net
> khaelin@REDACTED
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150408/5d4458c0/attachment.htm>


More information about the erlang-questions mailing list