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.
On Sun, Oct 14, 2012 at 02:29:48PM -0700, Roberto Ostinelli wrote:
> 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.
This ends up doing "application:start([compiler])" which returns an error,
init(3) probably ignores return value as it couldn't really know what to
expect. Try with -eval instead:
BTW I vaguely recall rebar can do this for you somehow?
> Am I actually supposed to use application:start/1 in myapp anyways?
No, it's quite rare to do that, the only use case I've seen is bringing
protocol stacks up and down manually depending on availability of some
backend connections (well, lazy man's way to do that anyway).
Oh I see. I wanted to avoid `eval` for some reason, but this works
perfectly. Thank you.
BTW I vaguely recall rebar can do this for you somehow?
No idea. Tuncer? :)
> Am I actually supposed to use application:start/1 in myapp anyways?
> No, it's quite rare to do that, the only use case I've seen is bringing
> protocol stacks up and down manually depending on availability of some
> backend connections (well, lazy man's way to do that anyway).
> Oh I see. I wanted to avoid `eval` for some reason, but this works
> perfectly. Thank you.
> > BTW I vaguely recall rebar can do this for you somehow?
> No idea. Tuncer? :)
This is most likely referring to the release support and
scripts/templates.
> > > Am I actually supposed to use application:start/1 in myapp
> > > anyways?
> > No, it's quite rare to do that, the only use case I've seen is
> > bringing protocol stacks up and down manually depending on
> > availability of some backend connections (well, lazy man's way to
> > do that anyway).