diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_compile.erl | 2 | ||||
-rw-r--r-- | src/rebar_utils.erl | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl index 72320fb..75e6eee 100644 --- a/src/rebar_prv_compile.erl +++ b/src/rebar_prv_compile.erl @@ -145,7 +145,7 @@ compile(State, Providers, AppInfo) -> code:add_pathsa(PluginDepsPaths), AppFileCompileResult = rebar_otp_app:compile(State, AppInfo4), %% Clean up after ourselves, leave things as they were. - rebar_utils:remove_from_code_path(PluginDepsPaths), + rebar_utils:remove_from_code_path(PluginDepsPaths, soft_purge), case AppFileCompileResult of {ok, AppInfo5} -> diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 5ea0452..64d4952 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -49,6 +49,7 @@ update_code/1, update_code/2, remove_from_code_path/1, + remove_from_code_path/2, cleanup_code_path/1, args_to_tasks/1, expand_env_variable/3, @@ -753,6 +754,9 @@ update_code(Paths, Opts) -> end, Paths). remove_from_code_path(Paths) -> + remove_from_code_path(Paths, purge). + +remove_from_code_path(Paths, Type) when Type == purge; Type == soft_purge -> lists:foreach(fun(Path) -> Name = filename:basename(Path, "/ebin"), App = list_to_atom(Name), @@ -763,7 +767,7 @@ remove_from_code_path(Paths) -> ok; {ok, Modules} -> application:unload(App), - [begin code:purge(M), code:delete(M) end || M <- Modules] + [begin code:Type(M), code:delete(M) end || M <- Modules] end, code:del_path(Path) end, lists:usort(Paths)). |