From d425b4e4baed1743cc2513d89423137371c68341 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 28 Nov 2018 14:28:20 -0500 Subject: [PATCH] Fix load order for custom project builders Due to building dependencies with potential artifacts such as parse transforms or macros, project builder plugins should be included in the path, but _after_ deps are loaded. Doing otherwise means that if any of the dependencies is required at compile time, those of a plugin might get used first. --- src/rebar_prv_compile.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl index ee96d9fb..ad012eaa 100644 --- a/src/rebar_prv_compile.erl +++ b/src/rebar_prv_compile.erl @@ -201,7 +201,7 @@ build_app(AppInfo, State) -> case lists:keyfind(Type, 1, ProjectBuilders) of {_, Module} -> %% load plugins since thats where project builders would be - rebar_paths:set_paths([plugins, deps], State), + rebar_paths:set_paths([deps, plugins], State), Res = Module:build(AppInfo), rebar_paths:set_paths([deps], State), case Res of