diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_core.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 631cef2..4efc978 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -502,6 +502,8 @@ acc_modules([Module | Rest], Command, Config, File, Acc) -> %% plugin_modules(Config, PredirsAssoc) -> Modules = lists:flatten(rebar_config:get_all(Config, plugins)), + ?DEBUG("Plugins requested while processing ~s: ~p~n", + [rebar_utils:get_cwd(), Modules]), plugin_modules(Config, PredirsAssoc, ulist(Modules)). ulist(L) -> @@ -543,6 +545,7 @@ plugin_modules(Config, PredirsAssoc, FoundModules, MissingModules) -> load_plugin_modules(Config, PredirsAssoc, Modules) -> Cwd = rebar_utils:get_cwd(), PluginDirs = get_all_plugin_dirs(Config, Cwd, PredirsAssoc), + ?DEBUG("Plugin dirs for ~s:~n~p~n", [Cwd, PluginDirs]), %% Find relevant sources in base_dir and plugin_dir Erls = string:join([atom_to_list(M)++"\\.erl" || M <- Modules], "|"), @@ -558,7 +561,9 @@ load_plugin_modules(Config, PredirsAssoc, Modules) -> {Loaded, NotLoaded}. get_all_plugin_dirs(Config, Cwd, PredirsAssoc) -> - get_plugin_dir(Config, Cwd) ++ get_base_plugin_dirs(Cwd, PredirsAssoc). + [rebar_utils:get_cwd()] + ++ get_plugin_dir(Config, Cwd) + ++ get_base_plugin_dirs(Cwd, PredirsAssoc). get_plugin_dir(Config, Cwd) -> case rebar_config:get_local(Config, plugin_dir, undefined) of @@ -577,7 +582,7 @@ get_base_plugin_dirs(Cwd, PredirsAssoc) -> [filename:join(Dir, "plugins") || Dir <- get_plugin_base_dirs(Cwd, PredirsAssoc)]. -%% @doc PredirsAssoc is a dictionary of plugindir -> 'parent' pairs +%% @doc PredirsAssoc is a dictionary of plugindir -> 'parent' pairs. %% 'parent' in this case depends on plugin; therefore we have to give %% all plugins that Cwd ('parent' in this case) depends on. get_plugin_base_dirs(Cwd, PredirsAssoc) -> |