[erlang-questions] erlang autobuild

t x txrev319@REDACTED
Mon Apr 14 23:27:51 CEST 2014


Yeah, I ended up using sync:on_reload(...) [1] to call
application:stop and application:start on reloads.

[1] function name may be wrong, away from my dev machine at the moment

On Mon, Apr 14, 2014 at 1:59 PM, Jesse Gumm <gumm@REDACTED> wrote:
> Sync is definitely a handy tool, but I should point out that it doesn't (per
> your original request) restart your app - it uses erlang's hot code
> reloading (which is usually better than restarting *anyway*). But if you
> were updating some initialization code or something like that that only runs
> during startup, you'd have to manually restart the vm, or you could look
> into the post-compile hooks if you *really* want it to auto-restart some
> processes after reloading.
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
> On Apr 14, 2014 11:40 AM, "t x" <txrev319@REDACTED> wrote:
>>
>> Yes, this was exactly what I ended up using. :-)
>>
>> On Sun, Apr 13, 2014 at 9:48 PM, Dmitry Bushmelev
>> <dmitrii.bushmelev@REDACTED> wrote:
>> > Hi, look at https://github.com/rustyio/sync.
>> >
>> > On 14 Apr 2014, at 08:02, t x <txrev319@REDACTED> wrote:
>> >
>> > Hi,
>> >
>> >  In clojurescript, I can do something like:
>> >
>> >  "lein autobuild"
>> >
>> >  which basically means, any time src/**/*.cljs changes, recompile
>> > everything.
>> >
>> >
>> >
>> >  Is there a similar way to do something like the above in erlang ?
>> >
>> >  I would like to do :
>> >
>> >  "erlang-magic autobuild"
>> >
>> >  so that any time I save a file in src/*.erl, it does:
>> >
>> >  "make" (since I'm running erlang.mk)
>> >  _rel/bin/release/my_app stop
>> >  _rel/bin/release/my_app start
>> >
>> > ?
>> >
>> > Thanks!
>> >
>> >
>> > Basically, I want a "file save" in Emacs to trigger:
>> >  * recompile
>> >  * kill old app
>> >  * start new app
>> > _______________________________________________
>> > erlang-questions mailing list
>> > erlang-questions@REDACTED
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> >
>> >
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list