summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2019-02-04 17:35:36 -0500
committerGitHub <noreply@github.com>2019-02-04 17:35:36 -0500
commit5f281b9928a2fc328967d171ecad676d8a356161 (patch)
treeae94c9162521746cecddd71b16b36915cb87386d
parent38e1964101906aa79e6d839d9a43dabcb1ddb0b5 (diff)
parente3c3c0ba04d76ee5c660d1eafb5a65a82755498a (diff)
Merge pull request #2013 from ferd/config-supported-path-blacklist
Support setting shell hot code loading blacklists
-rw-r--r--src/rebar_agent.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rebar_agent.erl b/src/rebar_agent.erl
index b4734f1..ed23fb7 100644
--- a/src/rebar_agent.erl
+++ b/src/rebar_agent.erl
@@ -167,11 +167,14 @@ maybe_show_warning(State) ->
%% that makes sense.
-spec refresh_paths(rebar_state:t()) -> ok.
refresh_paths(RState) ->
+
RefreshPaths = application:get_env(rebar, refresh_paths, [all_deps, test]),
ToRefresh = parse_refresh_paths(RefreshPaths, RState, []),
%% Modules from apps we can't reload without breaking functionality
+ ShellOpts = rebar_state:get(RState, shell, []),
+ ShellBlacklist = proplists:get_value(app_reload_blacklist, ShellOpts, []),
Blacklist = lists:usort(
- application:get_env(rebar, refresh_paths_blacklist, [])
+ application:get_env(rebar, refresh_paths_blacklist, ShellBlacklist)
++ [rebar, erlware_commons, providers, cf, cth_readable]),
%% Similar to rebar_utils:update_code/1, but also forces a reload
%% of used modules. Also forces to reload all of ebin/ instead