2

I'm trying to add davisp/jiffy as a rebar dependency in Ejabberd so I can do some JSON parsing in my modules. I found this tutorial, where they add Jiffy as a dependency for a different project, but it didn't work. I tweaked it a little to match how they import other dependencies in Ejabberd, and it still didn't work. This is what my Deps looks like in rebar.config.script:

Deps = [{p1_cache_tab, ".*", {git, "git://github.com/processone/cache_tab"}},
        {p1_tls, ".*", {git, "git://github.com/processone/tls"}},
        {p1_stringprep, ".*", {git, "git://github.com/processone/stringprep"}},
        {p1_xml, ".*", {git, "git://github.com/processone/xml"}},
        {esip, ".*", {git, "git://github.com/processone/p1_sip"}},
        {jiffy,   "0.*", {git, "git://github.com/davisp/jiffy"}},
        {p1_stun, ".*", {git, "git://github.com/processone/stun"}},
        {p1_yaml, ".*", {git, "git://github.com/processone/p1_yaml"}},
        {ehyperloglog, ".*", {git, "https://github.com/vaxelfel/eHyperLogLog.git"}},
        {p1_utils, ".*", {git, "git://github.com/processone/p1_utils"}}],

Output of calling make:

ejabberd@ubuntuserver:~/ejabberd$ make
/usr/lib/erlang/bin/escript rebar skip_deps=true compile
==> rel (compile)
==> avalanche (compile)
Dependency not available: jiffy-0.* ({git,"git://github.com/davisp/jiffy"})
ERROR: compile failed while processing /home/ejabberd/avalanche: rebar_abort
make: *** [src] Error 1

What am I doing wrong?

sudo
  • 5,604
  • 5
  • 40
  • 78

1 Answers1

5

I don't know why, but make clean then make again made it work. I figured this out by making that Canillita thing from the tutorial and seeing that it had no problem with Jiffy, so I assumed it was because I was making it clean.

sudo
  • 5,604
  • 5
  • 40
  • 78
  • 2
    I guess you changed the configure options after the first make. Rebar is caching the downloaded module and does not force by itself the download of new module. Restarting from scratch with a clean forced him to do so. – Mickaël Rémond May 22 '15 at 09:46