View Source mix compile.propagate_file_modifications (antikythera v0.5.1)
Touches source files that need to be recompiled.
Normally mix automatically resolves which source files to recompile based on file modification times. However some macro-related code modifications do not trigger recompilation. This mix task finds those kinds of modifications and touch files to compile so that subsequent task recompiles them.
Note that @external_resource module attribute does not support directory as external dependency of a module.
For a module that depends on all files under a directory, we have to manually check the latest modification time
of the whole directory tree.
Current targets of this task are:
mix.exsfiles in gear projects depend onmix_common.exsin the antikythera repository. Mix assumes that project configurations reside only inmix.exsandconfig/*.exs, so even ifmix_common.exshas been modified mix does not notice. Note that antikythera'smix.exsalso depends onmix_common.exsbut it's handled differently (at the beginning ofmix.exs), because we can't run mix tasks before it's compiled!SomeGear.Templatemodule depends on all existing HAML templates inweb/template/.- Similarly,
SomeGear.Assetmodule depends on all asset files inpriv/static/. AlthoughSomeGear.Assetis recompiled after modifying an asset file, it doesn't automatically trigger recompilation/reload in iex session becausepriv/static/**is not monitored by:exsync(in current configuration).
Summary
Functions
Callback implementation for Mix.Task.Compiler.run/1.
Functions
Callback implementation for Mix.Task.Compiler.run/1.