Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lager must be included as dep in root rebar.config #18

Open
geib opened this issue Jul 6, 2016 · 3 comments
Open

Lager must be included as dep in root rebar.config #18

geib opened this issue Jul 6, 2016 · 3 comments

Comments

@geib
Copy link

geib commented Jul 6, 2016

I have an erlang project which I am migrating to use the rebar3_plugin, but the project does not use lager. If I don't include lager in the root rebar.config then the application will not start. I appears as though a dependency of lager, within the cuttlefish plugin, does not start.

As a workaround including lager in the rebar.config of the project fixes the issue.

Here is a snippet of the error on the console:

  • ERTS_LIB_DIR=/home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/erts-7.2/../lib
  • CUTTLEFISHCMD=/home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/erts-7.2/bin/escript /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/bin/cuttlefish
  • cd /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler
  • /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/erts-7.2/bin/escript /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/bin/cuttlefish -e /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/etc -d /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/generated.conf -s /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/share/schema/ -c /home/geib/git/cse.spooler.v2/_build/prod/rel/cse_spooler/etc/cse_spooler.conf
  • CUTTLEFISH_CONFIG=escript: exception error: {app_start_failed,syntax_tools,
    {"no such file or directory",
    "syntax_tools.app"}}
    in function lager:start_ok/2 (/home/geib/git/cse.spooler.v2/_build/default/plugins/lager/src/lager.erl, line 58)
    in call from lager:start_ok/2 (/home/geib/git/cse.spooler.v2/_build/default/plugins/lager/src/lager.erl, line 55)
    in call from lager:start_ok/2 (/home/geib/git/cse.spooler.v2/_build/default/plugins/lager/src/lager.erl, line 55)
    in call from cuttlefish_escript:main/1 (/home/geib/git/cse.spooler.v2/_build/default/plugins/cuttlefish/src/cuttlefish_escript.erl, line 83)
    in call from escript:run/2 (escript.erl, line 757)
    in call from escript:start/1 (escript.erl, line 277)
    in call from init:start_it/1
    in call from init:start_em/1
  • echo Cuttlefish failed! Oh no!
    Cuttlefish failed! Oh no!
  • exit 1
@binarytemple
Copy link

+1 on this issue, working through it ATM

@tsloughter
Copy link
Collaborator

Cuttlefish does depend on lager, I think it should be changed to not do so. Since the other solution is changing cuttlefish's .app.src https://github.com/basho/cuttlefish/blob/develop/src/cuttlefish.app.src to have lager properly in the applications list. But then that forces anyone who wants to use cuttlefish to use lager.

@binarytemple
Copy link

I've been running Erlang 19 - seems like the error was the same as this one : Feuerlabs/exometer_core#80

Added a specific dependency on a newer version of lager:

{deps, [
 {lager, {git, "git://github.com/basho/lager.git", {tag, "3.2.2"}}}, 

Then ran the following to unlock the lower level dependency:

rebar3 upgrade lager  

And everything works now.

Worth mentioning that I also deleted the _build directory for good measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants