Skip to content

Allow recursive_cmds override via REBAR_NON_RECURSIVE_CMDS #248

Open
wants to merge 1 commit into from

4 participants

@tuncer
tuncer commented Mar 12, 2014

For the vast majority of projects it makes no sense to apply
'rebar compile' recursively, except when explicitly running
'rebar prepare-deps' or 'rebar refresh-deps'. So, to keep deps
and sub projects untouched, we need a way to disable the default
recursive behavior of 'rebar compile'.

The environment variable REBAR_NON_RECURSIVE_CMDS can be used
to pass in a comma separated list of commands to remove from the
built-in list of recursive commands. Commands ending with *-deps
are ignored.

@dizzyd
Rebar member
dizzyd commented Mar 12, 2014

My $0.02 - this doesn't improve the predictability or reduce complexity of Rebar. There are always going to be different variations of projects out there, but that doesn't mean we need to cater to all of them.

@ferd
ferd commented Mar 12, 2014

I think it would make sense for most projects to have compile be recursive along with a recursive command (i.e. get-deps), but not in other cases.

For example, whenever I'm doing something close to TDD with common test, it sucks having to always split commands (rebar compile ct) -- that one could be fixed to work the way rebar eunit does, but yeah.

Plenty of recompiling I do is on apps I own, not deps I depend on. The common case is that when I'm fetching deps, I want to compile them all (same with update-deps, if it works). When I don't mention deps, it's slowing down my workflow.

@tsloughter
Rebar member

I hate recursive compile, but I think that is in large part due to how long it takes to run compile recursively even if the only code changes exist in the root project. So that may be another way to improve the experience instead.

@ferd ferd added the enhancement label Jun 15, 2014
@tuncer tuncer Allow recursive_cmds override via REBAR_NON_RECURSIVE_CMDS
For the vast majority of projects it makes no sense to apply
'rebar compile' recursively, except when explicitly running
'rebar prepare-deps' or 'rebar refresh-deps'. So, to keep deps
and sub projects untouched, we need a way to disable the default
recursive behavior of 'rebar compile'.

The environment variable REBAR_NON_RECURSIVE_CMDS can be used
to pass in a comma separated list of commands to remove from the
built-in list of recursive commands. Commands ending with *-deps
are ignored.
bf0324d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.