From aa95b79020875a48234d8b92c713c928d65a5e1f Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 29 Oct 2020 18:16:47 +0000 Subject: [PATCH] Keep the prebuilt app set broader Closer to what it was initially, and reduces some extra operations too. --- src/rebar_plugins.erl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl index 7fe56b69..f2d22233 100644 --- a/src/rebar_plugins.erl +++ b/src/rebar_plugins.erl @@ -114,14 +114,13 @@ handle_plugin(Profile, Plugin, State, Upgrade) -> %% Add already built plugin deps to the code path 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), %% 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 State3 = rebar_state:update_all_plugin_deps(State2, Apps),