[erlang-questions] Auto recompilation

Matthew Dempsky <>
Wed Aug 13 21:01:22 CEST 2008


mochiweb includes a module "reloader" that will monitor any loaded
.beam files for changes and automatically reload them and try to run
an exported test/0 method if available:

    http://code.google.com/p/mochiweb/source/browse/trunk/src/reloader.erl

I typically edit files in Emacs, run Erlang in a separate terminal
(not using any of erlang-mode's integration), run M-x recompile in
Emacs to rebuild files, and the Erlang process will detect the new
.beams and run our regression tests for the modules.

On Wed, Aug 13, 2008 at 2:18 AM, Paul Guyot <> wrote:
> Hello,
>
> Do you know of an auto-recompilation server, i.e. a process that
> looks for changes in source files and recompiles whatever changed in
> the background?
>
> There is eunit's watcher, but from I gather reading the source, it is
> not an auto-recompilation server. It is opt-in (you must declare
> modules to watch), it doesn't recompile and it uses code:purge/1
> instead of code:soft_purge/1 (which can kill a process).
>
> I've cooked a simple one, but since this is a very small (<200 lines)
> albeit useful program, I guess there should be a more mature
> implementation around, but I couldn't find one with a Google search.
>
> Paul
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list