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. --- ebin/rebar.app | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ebin') diff --git a/ebin/rebar.app b/ebin/rebar.app index 8e239e9..2aae95e 100644 --- a/ebin/rebar.app +++ b/ebin/rebar.app @@ -38,6 +38,7 @@ rebar_upgrade, rebar_utils, rebar_xref, + rebar_metacmds, rebar_getopt, rebar_mustache ]}, {registered, []}, @@ -80,7 +81,8 @@ rebar_escripter, rebar_edoc, rebar_shell, - rebar_xref + rebar_xref, + rebar_metacmds ]}, {rel_dir, [ @@ -88,6 +90,13 @@ rebar_reltool, rebar_upgrade ]} - ]} + ]}, + {recursive_cmds, [ + 'get-deps', + 'check-deps', + 'delete-deps', + 'list-deps', + 'update-deps' + ]} ]} ]}. -- cgit v1.2.1