浏览代码

Merge pull request #2013 from ferd/config-supported-path-blacklist

Support setting shell hot code loading blacklists
pull/2014/head
Fred Hebert 6 年前
提交者 GitHub
父节点
当前提交
5f281b9928
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      src/rebar_agent.erl

+ 4
- 1
src/rebar_agent.erl 查看文件

@ -167,11 +167,14 @@ maybe_show_warning(State) ->
%% that makes sense. %% that makes sense.
-spec refresh_paths(rebar_state:t()) -> ok. -spec refresh_paths(rebar_state:t()) -> ok.
refresh_paths(RState) -> refresh_paths(RState) ->
RefreshPaths = application:get_env(rebar, refresh_paths, [all_deps, test]), RefreshPaths = application:get_env(rebar, refresh_paths, [all_deps, test]),
ToRefresh = parse_refresh_paths(RefreshPaths, RState, []), ToRefresh = parse_refresh_paths(RefreshPaths, RState, []),
%% Modules from apps we can't reload without breaking functionality %% 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( 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]), ++ [rebar, erlware_commons, providers, cf, cth_readable]),
%% Similar to rebar_utils:update_code/1, but also forces a reload %% Similar to rebar_utils:update_code/1, but also forces a reload
%% of used modules. Also forces to reload all of ebin/ instead %% of used modules. Also forces to reload all of ebin/ instead

正在加载...
取消
保存