Kernel.ParallelCompiler

A module responsible for compiling files in parallel.

Source

Summary

files(files, callbacks \\ [])

Compiles the given files

files_to_path(files, path, callbacks \\ [])

Compiles the given files to the given path. Read files/2 for more information

Functions

files(files, callbacks \\ [])

Compiles the given files.

Those files are compiled in parallel and can automatically detect dependencies between them. Once a dependency is found, the current file stops being compiled until the dependency is resolved.

If there is an error during compilation or if warnings_as_errors is set to true and there is a warning, this function will fail with an exception.

This function receives a set of callbacks as options:

  • :each_file - for each file compiled, invokes the callback passing the file
  • :each_module - for each module compiled, invokes the callback passing the file, module and the module bytecode

The compiler doesn't care about the return values of the callbacks. Returns the modules generated by each compiled file.

Source
files_to_path(files, path, callbacks \\ [])

Compiles the given files to the given path. Read files/2 for more information.

Source