rebar3



Build better Erlang.

Ask A Question

Questions

6

Help with erlydtl plugin in a project with `release` template

Hi friends! Thanks so much for all the great work — rebar3 continues to be fabulous and make my Erlang development lovely :) My question regards use of the [rebar3_erlydtl_plugin](https://github.com/tsloughter/rebar3_erlydtl_plugin): first, in both the [Plugins page](http://www.rebar3.org/docs/using-available-plugins#erlydtl) and the [project README](https://github.com/tsloughter/rebar3_erlydtl_plugin/blob/master/README.md), I found the fetch syntax to not work unless I changed the URL from `git://github.com:tsloughter/rebar3_erlydtl_plugin.git` to `git@github.com:tsloughter/rebar3_erlydtl_plugin.git`: setting `DEBUG=1` showed me git was failing the fetch, which is curious because the `git://` format works in `deps`. After I got it running however, `rebar3 erlydtl compile` fails when I run it from the top level of the releases template, which is to say, my project is split into `apps/otp_app1, apps/otp_app2, ...`. Digging into the source with `DEBUG` set, I find the issue is [here](https://github.com/tsloughter/rebar3_erlydtl_plugin/blob/master/src/rebar3_erlydtl_plugin.erl#L126), where the plugin [expects to be called from an OTP app](https://github.com/rebar/rebar3/blob/master/src/rebar_app_discover.erl#L131-L136) but, from the `release` template, can't delve into the appropriate subdirectories. I'm happy to submit a pull request for whatever is the best desired functionality for a case like this, but don't want to write something with design implications ("how does a plugin negotiate being run in the app template vs. release template") without asking the pros first, especially since I might be missing something basic in my config/invocation somewhere. Thanks!

Posted by Pablo Meier 3 years ago