Configuring Lager - I get this error: undefined parse transform 'lager_transform'
Asked Answered
T

2

5

I'm testing this https://github.com/saleyn/erws_example on R16B03 (both on windows & Ubuntu)

==> erws_example (compile)
src/erws_handler.erl:none: undefined parse transform 'lager_transform'
ERROR: compile failed while processing /home/charles/erws_example: rebar_abort

I've seen this suggestion http://philipcristiano.com/2013/05/27/ordering-of-rebar-dependencies.html

So far, i'm unable to get any headway.

Thanks.

Transparency answered 28/12, 2013 at 10:32 Comment(1)
You got error undefined parse transform 'lager_transform' because of option {erl_opts, [{parse_transform, lager_transform}]}. in your rebar.conf file. It says that parse transform will be applied to each module during compilation. But lager_transform function is defined in lager modules which is not yet compiled itself. So probably you should compile lager project manually to avoid this error.Candra
C
3

It seems rebar can not compile parse transforms before compiling everything else (https://github.com/basho/rebar/issues/270). The solution is to compile module with parse transform manually or use file-level parse_transform compiler directive instead of project level.

Candra answered 28/12, 2013 at 16:24 Comment(1)
Using elixir with a dependency on chatterbox, I had to do the following: ``` mix deps.compile lager mix deps.compile chatterbox ```Splenetic
B
3

Try to put lager to first position in rebar dependency list. it will fix it. rebar ordering compile dependencies according to this list, not dependency tree))

Bologna answered 12/5, 2015 at 15:51 Comment(1)
lager already is in the first position in the dependency list.Revoice

© 2022 - 2024 — McMap. All rights reserved.