Way to use local deps at the command line?

Tim Watson watson.timothy at gmail.com
Thu Jun 2 06:01:27 EDT 2011

On 2 June 2011 03:31, Gregory Haskins <gregory.haskins at gmail.com> wrote:
> Hi All,
> I am wondering if there is a way to make rebar ignore the source tuple
> for a given dependency as a temporary measure?  For instance, today I am
> doing something like this:
> diff --git a/examples/hello/rebar.config b/examples/hello/rebar.config
> index 40a843e..7297be0 100644
> --- a/examples/hello/rebar.config
> +++ b/examples/hello/rebar.config
> @@ -1,4 +1,4 @@
>  {deps, [
> -       {efuse, ".*", {git, "git://github.com/ghaskins/efuse.git",
> {branch, "master"}}}
> +       {efuse, ".*", undefined}
>        ]}.
> and I then set my ERL_LIBS to point to the library in question.  This of
> course works fine, but its a PITA to edit the rebar.config file like
> that.  I would rather do something like "rebar compile
> --ignore-dep-sources".  Is this (or something equivelent) possible?
> Kind Regards,
> -Greg

Personally I favour installing things into ERL_LIBS using
epm/sutro/agner/cean/etc and just putting the {name, Vsn} dependency
tuple into the rebar.config to make sure that anyone building my
locally will get a *useful* error message about the missing deps.
Another way to get around this is to have a two rebar config files,
one with explicit (scm location) deps and the other without. You can
flip between these two "profiles" using `./rebar -C
rebar.local.config` and it wouldn't be hard to write a little escript
that strips the SCM part of the deps tuple in your rebar.config and
rewrites to another file without it.

More information about the rebar mailing list