summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralisdair sullivan <alisdairsullivan@yahoo.ca>2015-02-17 15:44:05 -0800
committeralisdair sullivan <alisdairsullivan@yahoo.ca>2015-02-17 16:15:35 -0800
commitffbb31e660c4903a7f8240ee917d7125459aac44 (patch)
tree79126c99d2c4f4dcbd20b9f7c9b7acc3f50a54b6 /src
parentc5a655da140ed66818e5d22f1924dd60ab381d48 (diff)
purge mods loaded during check to see if they need to be recompiled
during compile task before running subsequent tasks
Diffstat (limited to 'src')
-rw-r--r--src/rebar_erlc_compiler.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 14e6349..330f20b 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -265,9 +265,11 @@ opts_changed(Opts, Target) ->
case code:load_abs(ObjectFile) of
{module, Mod} ->
Compile = Mod:module_info(compile),
+ %% dialyzer and eunit have trouble without the next two lines
+ code:delete(Mod),
+ code:purge(Mod),
lists:sort(Opts) =/= lists:sort(proplists:get_value(options,
- Compile,
- undefined));
+ Compile));
{error, nofile} -> true
end.