Skip to content

Commit

Permalink
Merge pull request #2013 from ferd/config-supported-path-blacklist
Browse files Browse the repository at this point in the history
Support setting shell hot code loading blacklists
  • Loading branch information
ferd authored Feb 4, 2019
2 parents 38e1964 + e3c3c0b commit 5f281b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rebar_agent.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f281b9

Please sign in to comment.