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.exs
files in gear projects depend onmix_common.exs
in the antikythera repository. Mix assumes that project configurations reside only inmix.exs
andconfig/*.exs
, so even ifmix_common.exs
has been modified mix does not notice. Note that antikythera'smix.exs
also depends onmix_common.exs
but it's handled differently (at the beginning ofmix.exs
), because we can't run mix tasks before it's compiled!SomeGear.Template
module depends on all existing HAML templates inweb/template/
.- Similarly,
SomeGear.Asset
module depends on all asset files inpriv/static/
. AlthoughSomeGear.Asset
is 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
.