From 77a0eb6fe4dca909c6fe63f00b6793ba759f1a63 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Mon, 5 Nov 2012 20:08:48 +0100 Subject: Fix #56 (always-on recursion) Always-on recursive application of all rebar commands causes too many issues. Recursive application is required for: 1. dealing with dependencies: get-deps, update-deps, and compile of deps right after get-deps or update-deps 2. projects with a riak-like apps/ project structure and dev process The vast majority of projects are not structured like riak. Therefore, moving forward it's best to (by default) restrict recursive behavior to dealing with deps. This commit does that and also adds command line and rebar.config options for controlling or configuring recursion. Also, we introduce two meta commands: prepare-deps (equivalent to rebar -r get-deps compile) and refresh-deps (equivalent to rebar -r update-deps compile). riak-like projects can extend the list of recursive commands (to include 'eunit' and 'compile') by adding {recursive_cmds, [eunit, compile]} to rebar.config. --- inttest/tdeps2/tdeps2_rt.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inttest/tdeps2') diff --git a/inttest/tdeps2/tdeps2_rt.erl b/inttest/tdeps2/tdeps2_rt.erl index 987567e..61fc42b 100644 --- a/inttest/tdeps2/tdeps2_rt.erl +++ b/inttest/tdeps2/tdeps2_rt.erl @@ -49,7 +49,8 @@ run(_Dir) -> ok = apply_cmds(GitCmds, [{dir, "repo/b"}]), ok = apply_cmds(GitCmds, [{dir, "repo/c"}]), - {ok, _} = retest_sh:run("./rebar -v get-deps compile", []), + {ok, _} = retest_sh:run("./rebar -v get-deps", []), + {ok, _} = retest_sh:run("./rebar -v -r compile", []), ok. %% -- cgit v1.1 From 415d872730daf58a91b6fbd6d3eac1f015cb9c24 Mon Sep 17 00:00:00 2001 From: Jared Morrow Date: Tue, 11 Mar 2014 21:23:16 +0000 Subject: Keep compile recursive and update the tests to not pass -r to compile --- inttest/tdeps2/tdeps2_rt.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inttest/tdeps2') diff --git a/inttest/tdeps2/tdeps2_rt.erl b/inttest/tdeps2/tdeps2_rt.erl index 61fc42b..22f0abe 100644 --- a/inttest/tdeps2/tdeps2_rt.erl +++ b/inttest/tdeps2/tdeps2_rt.erl @@ -50,7 +50,7 @@ run(_Dir) -> ok = apply_cmds(GitCmds, [{dir, "repo/c"}]), {ok, _} = retest_sh:run("./rebar -v get-deps", []), - {ok, _} = retest_sh:run("./rebar -v -r compile", []), + {ok, _} = retest_sh:run("./rebar -v compile", []), ok. %% -- cgit v1.1