mix
mix compile.elixir
Compiles Elixir source files.
Elixir is smart enough to recompile only files that have changed and their dependencies. This means if lib/a.ex
is invoking a function defined over lib/b.ex
, whenever lib/b.ex
changes, lib/a.ex
is also recompiled.
Note it is important to recompile a file’s dependencies as there are often compile time dependencies between them.
Command line options
-
--force
- forces compilation regardless of modification times -
--docs
(--no-docs
) - attaches (or not) documentation to compiled modules -
--debug-info
(--no-debug-info
) - attaches (or not) debug info to compiled modules -
--ignore-module-conflict
- does not emit warnings if a module was previously defined -
--warnings-as-errors
- treats warnings as errors and return a non-zero exit code -
--long-compilation-threshold N
- sets the “long compilation” threshold (in seconds) toN
(see the docs forKernel.ParallelCompiler.files/2
)
Configuration
-
:elixirc_paths
- directories to find source files. Defaults to["lib"]
. -
:elixirc_options
- compilation options that apply to Elixir’s compiler, they are::ignore_module_conflict
,:docs
and:debug_info
. By default, uses the same defaults aselixirc
and they can always be overridden from the command line according to the options above.
Summary
Functions
- clean()
-
Cleans up compilation artifacts
- manifests()
-
Returns Elixir manifests
- run(args)
-
Runs this task
Functions
clean()
Cleans up compilation artifacts.
manifests()
Returns Elixir manifests.
run(args)
run(OptionParser.argv) :: :ok | :noop
Runs this task.
© 2012–2017 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/mix/1.4.5/Mix.Tasks.Compile.Elixir.html