Search code examples
erlangcouchdbrebarrebar3

Trouble specifying rebar dependency when trying to profile couchdb using eflame


I am trying to use eflame to profile CouchDB code to investigate some performance issues in my application. I tried adding the eflame dependency in rebar.config.script (https://github.com/apache/couchdb/blob/master/rebar.config.script)

However I get an error when I run configure to build CouchDB (2.0.0) from its source:

Dependency not available: eflame-.* ({git,
                                      "git://github.com/proger/eflame.git",
                                      {branch,"master"}})
ERROR: compile failed while processing /tmp/couchdb: rebar_abort
Makefile:67: recipe for target 'couch' failed

My change in the rebar.config.script in CouchDB source was adding a single line below (with a comma in the previous line of course)

{eflame, {url, "git://github.com/proger/eflame.git"}, {branch ,"master"}}

I tried various combinations of specifying the dependency as shown in rebar documentation but without any success.(I took into account the order of arguments in the MakeDep function in the rebar.config.script and accordingly tried to pass the arguments)

Any pointers to resolve will be greatly appreciated. Thanks! (Note : I am not familiar with Erlang or rebar , so please excuse any obvious mistakes)


Solution

  • It looks like what's missing in your case is the second argument of the tuple, that requires the version number. You can use an asterix there if you don't need a specific one:

    {eflame, ".*", {git, "git://github.com/proger/eflame.git", {branch, "master"}}}
    

    Alternatively, if you are using rebar3, you could use the hex package:

    {eflame, "1.0.1"}