Phoenix.CodeReloader

Server to handle automatic code reloading

For each request, Phoenix checks if any of the modules previously compiled requires recompilation via phoenix_recompile?/0 and then calls mix compile for sources exclusive to the web directory.

To race conditions, all code reloads are funneled through a sequential call operation.

Summary

reload!()

Reloads codes witin web/ directory

start_link()

Starts the code reloader server

touch()

Touches sources that should be recompiled

Functions

reload!()

Reloads codes witin web/ directory

start_link()

Starts the code reloader server

The code reloader server is automatically started by Phoenix.

touch()

Touches sources that should be recompiled

This works by checking each compiled Phoenix module if phoenix_recompiled?/0 returns true and if so it touches it sources file.