[erlang-questions] application starting in releases

Roberto Ostinelli roberto@REDACTED
Sun Oct 14 23:29:48 CEST 2012


Dear list,

AFAIK a release will start the dependency applications defined in an
application .app file. So for instance, if I specify:

{application, myapp, [
{description, ""},
{vsn, "0.1-dev"},
{modules, []},
{registered, [
]},
{applications, [
kernel,
stdlib,
compiler,
syntax_tools,
lager
]},
{mod, {myapp, []}},
{env, []}
]}.

When I package all of this as a release, all of the specified applications
will be started automatically when I launch myapp. Is this correct?

If so, I want to have a developer start script that starts these
applications manually, to emulate what the release will launch for me: I do
not want to have extra application:start(compiler) code in myapp, since I
won't need that once it's packaged.

So I'm using this:

erl -pa apps/*/ebin -pa deps/*/ebin \
-boot start_sasl \
-config app \
-s application start compiler
-s myapp

However compiler does not start:

1> application:which_applications().
[{sasl,"SASL  CXC 138 11","2.2.1"},
 {stdlib,"ERTS  CXC 138 10","1.18.2"},
 {kernel,"ERTS  CXC 138 10","2.15.2"}]

But if I manually start it:

2> application:start(compiler).
ok

Is there something I'm doing wrong? Am I actually supposed to use
application:start/1 in myapp anyways?

Thank you,

r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121014/ee90878f/attachment.htm>


More information about the erlang-questions mailing list