Browse Source

Keep the prebuilt app set broader

Closer to what it was initially, and reduces some extra operations too.
pull/2317/head
Fred Hebert 4 years ago
parent
commit
aa95b79020
1 changed files with 4 additions and 5 deletions
  1. +4
    -5
      src/rebar_plugins.erl

+ 4
- 5
src/rebar_plugins.erl View File

@ -114,14 +114,13 @@ handle_plugin(Profile, Plugin, State, Upgrade) ->
%% Add already built plugin deps to the code path %% Add already built plugin deps to the code path
ToBuildPaths = [rebar_app_info:ebin_dir(A) || A <- ToBuild], ToBuildPaths = [rebar_app_info:ebin_dir(A) || A <- ToBuild],
PreBuiltApps = [A || A <- Apps,
Ebin <- [rebar_app_info:ebin_dir(A)],
not lists:member(Ebin, ToBuildPaths)],
PreBuiltPaths = [rebar_app_info:ebin_dir(A) || A <- PreBuiltApps],
PreBuiltPaths = [Ebin || A <- Apps,
Ebin <- [rebar_app_info:ebin_dir(A)],
not lists:member(Ebin, ToBuildPaths)],
code:add_pathsa(PreBuiltPaths), code:add_pathsa(PreBuiltPaths),
%% Build plugin and its deps %% Build plugin and its deps
build_plugins(ToBuild -- PreBuiltApps, Apps, State2),
build_plugins(ToBuild, Apps, State2),
%% Add newly built deps and plugin to code path %% Add newly built deps and plugin to code path
State3 = rebar_state:update_all_plugin_deps(State2, Apps), State3 = rebar_state:update_all_plugin_deps(State2, Apps),

Loading…
Cancel
Save