diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2019-02-01 14:33:00 -0500 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2019-02-01 14:44:11 -0500 |
commit | 46b1666db99473f50516eb428904f787326474b1 (patch) | |
tree | 9dc10baeb649b9e5dbb5f1fd6e2e3a733ce8dc36 /rebar.config | |
parent | e5b9de0b8b4ad1c53ee8b68b2afc993dd15b5728 (diff) |
Fix handling of updated files in extra_src_dirs
This change fixes cases where changes in .hrl files would not be picked
up in .erl files that are in extra source directories (such as those
defined with `extra_src_dirs` or modules in the test/ directory during a
CT or Eunit run).
The problem was due to the way the Directed Acyclic Graph (DAG) of
dependencies between files was being loaded and stored by the compiler
modules.
Prior to this fix, a single DAG would be used for all runs. On a regular
run, the prior DAG is loaded from disk, re-checked, and if changed, it
would get re-written to disk with the changes deciding what to
re-compile. However, whenever extra source directories were specified, a
second run would be done which swaps target directories around in the
compiler modules.
Bug 1: this second run was done without properly tracking the private .hrl
files (in src/), so the changes were invisible. This has been fixed by
re-adding the paths.
The problem is that the DAG handling is self-contained; just invoking it
was sufficient to get it loaded and rewritten to disk. But since runs
with extra src dirs were done on different sets, the compilation of
extra src dirs would be done with bad historical data (all the modules
in src/ are dropped, all those in test/ are re-added); this DAG was then
written to disk once again, polluting the next non-extra run.
This is bug 2, and it is fixed by adding an optional label to each run
so that a regular or extra compile round can be distinguished, each
tracking their own files in their own DAG.
A single test (and a lot of diffing) were sufficient for this.
Diffstat (limited to 'rebar.config')
0 files changed, 0 insertions, 0 deletions