Skip to content

Rebar3 release with Erlang 20 doesn't include the plugin correctly #19

@marjaimate

Description

@marjaimate

I have a Rebar3 release generated, using this plugin. I was generating the release using Erlang 18.3 and never had a problem. Recently upgraded to 20.1 and kept getting an error on release generation:

$ rebar3 as prod release
===> Verifying dependencies...
===> Compiling tp_api
===> Running erlydtl...
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
          /srv/www/tp_api/releases/20171011220543/_build/prod/lib
          /srv/www/tp_api/releases/20171011220543/ebin
          /usr/lib/erlang/lib



===> Failed to solve release:
 Dependency erlydtl is specified as a dependency but is not reachable by the system.

I had erlydtl declared as an application dependency in the app.src file. Now, after getting this, I've removed it from the app.src file, and got the release done. But inside the application, every time I tried to use the generated functions, got an undef error:

(node@127.0.0.1)2> my_template_dtl:render([{}]).
** exception error: undefined function erlydtl_runtime:init_translation/1
     in function  my_template_dtl:render_internal/2 (, line 534)
     in call from my_template_dtl:render/2 (, line 515)

Note - this only happens inside a release, when you compile and run it with rebar3, it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions