[erlang-questions] starting otp application dependencies
Wed Apr 8 13:43:31 CEST 2015
On Apr 8, 2015 1:41 PM, "Nicolas Martyanoff" <khaelin@REDACTED> wrote:
> 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
> 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
> 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
> 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
> 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
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions