Still.Compiler.CompilationStage (Still v0.2.0) View Source

Almost every compilation request goes through CompilationStage. This process is responsible for keeping track of subscriptions (e.g: a browser subscribing to changes) and notifying all the subscribers of the end of the compilation cycle.

Subscribers to this process are notified when the queue is empty, which is usefull to refresh the browser or finish the compilation task in production.

Subscribers receive the event :bus_empty when CompilationStage's compilation cycle is finished.

There are many events that lead to a file being compiled:

  • when Still starts, all files are compiled;
  • files that change are compiled;
  • files that include files that have changed are compiled;
  • any many more.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Asynchronously saves a file in the compilation list.

Save a subscription to the compilation cycle.

Remove a subscription to the compilation cycle.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Asynchronously saves a file in the compilation list.

Files are compiled in parallel, meaning that every 100ms the compilation stage will run and compile any due source file. When no more files are ready to be compiled, the subscribers are notified.

Save a subscription to the compilation cycle.

Remove a subscription to the compilation cycle.