Overriding recursive dependencies for a single dep

Tim Watson watson.timothy at gmail.com
Fri Jul 22 14:29:26 EDT 2011

On 22 July 2011 18:00, Brian Rowe <rowe at muxspace.com> wrote:
> riak_kv, I get about a dozen dependencies pulled with it and a lengthy
> build process after a clean. Given that I really only want this module
> (source code doesn't appear to depend on the other libraries), is
> there a "best practice" for preventing a specific dependency from
> recursively downloading it's dependencies? I do have other
> dependencies where I do need their dependencies, so this is the
> gotcha.

It sounds like the issue with this isn't that you're fetching deps you
don't need - it's true that you are, but that's not what's causing the
pain. The real issue (if I've understood you correctly) is that
running 'clean compile' trounces all the dependencies (including the
transitive ones) which makes your build process slow. This is a real
pain that a lot of rebar users have complained about.

Personally, I would suggest for now that you work around it either by
running 'clean' with 'skip_deps=true' to avoid cleaning the deps, or
using one of the many alternative forks/patches that exclude deps in
some way or another. Some that might help are:

- https://github.com/basho/rebar/pull/85 - only recursive into
sub_dirs and deps when `-r` flag is present
- https://github.com/basho/rebar/pull/73 - default to skip_deps for
all destructive commands (e.g., clean, create template, etc)

> I'm considering overwriting riak_kv's rebar.config via my Makefile,
> but I was hoping somebody had a less brutish method for this.

Hopefully the approach I've suggested will work for you. Let me know
if it does!



More information about the rebar mailing list