[erlang-questions] Non-Erlang dependencies
Thu Jun 28 13:07:26 CEST 2012
On 28 Jun 2012, at 10:56, Benoit Chesneau wrote:
> On Thu, Jun 28, 2012 at 11:49 AM, Loïc Hoguin <essen@REDACTED> wrote:
>> No actually this is interesting. I *think* I can have a small script in a
>> get-deps post_hook to fetch the extra dependencies when you get the Erlang
>> ones. This way you download everything at the same time.
>> I'll try it out.
That will work fine, just don't *declare* them as dependencies, otherwise rebar will puke when it doesn't find an application resource file. There is a patch in the rebar pull request queue which adds support for non-otp (raw, as the author puts it) dependencies, which just get downloaded but not checked for OTP compliance. If you like this feature, please go vote for it as @dizzyd and @tuncer are deliberating at the moment. I'm going to up-vote it (after playing devil's advocate for a while) as I'd like to use deps for both things without messing around with hooks.
> This is what we do in refuge for now. Though it would be easier to
> have all included in rebar. Or maybe as a plugin. The only problem
> with that approach is when you need to distribute the sources with all
> the dependencies.
Plugin distribution is a bit of a PITA. It works fine as long as you are happy to 'get-deps compile <etc>' and have the plugin(s) kick-in *only* after the 'compile' command completes successfully. This is fine for most cases, but for dependency handling it doesn't work at all, making like quite onerous if you're trying to do custom dependency management as a plugin. I have no less than 3 custom dependency handling plugins, and none of them really come up to scratch because of this. Again, I think the rebar maintainers/developers are actively looking at this area at the moment so it's worth engaging with them (on the mailing list) if you have things you'd like them to take into consideration.
More information about the erlang-questions