diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-02-17 18:24:48 -0600 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-02-17 18:24:48 -0600 |
commit | 09a51a10eca9299d2c197d5502187bc14e296589 (patch) | |
tree | 79126c99d2c4f4dcbd20b9f7c9b7acc3f50a54b6 /src | |
parent | c5a655da140ed66818e5d22f1924dd60ab381d48 (diff) | |
parent | ffbb31e660c4903a7f8240ee917d7125459aac44 (diff) |
Merge pull request #161 from talentdeficit/recompile_purge
purge mods loaded during check to see if they need to be recompiled
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 6 |
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. |