[erlang-questions] Running rebar generated release failing with Kernel pid terminated"
Tuncer Ayaz
tuncer.ayaz@REDACTED
Thu Dec 13 13:42:51 CET 2012
On Thu, Dec 13, 2012 at 1:28 PM, Loic Hoguin wrote:
> On 12/13/2012 01:14 PM, Tuncer Ayaz wrote:
>>
>> On Thu, Dec 13, 2012 at 12:55 PM, Loic Hoguin wrote:
>>>
>>> The problem is probably that rebar doesn't use the default reltool
>>> mod_cond value. So not all modules are included. Try changing it
>>> to this:
>>>
>>> {mod_cond, all}
>>
>>
>> For certain incorrect/incomplete app resource files you may have to
>> use such a work around. Normally the right solution is to fix the
>> app resource files.
>
>
> Why change the default reltool value in the first place, though? I
> don't get it. Also how would reltool know I need certain modules if
> they're only used dynamically?
The default reltool spec template you get when using 'rebar create' is
configured to create a release that contains only what's required. I
don't think reltool can or should know modules you load from
unreferenced applications at runtime. If it's always the same module
from the same application, you should specify the application in your
app's app resource file. If this can't be done for some reason, just
change the reltool spec accordingly. Unsurprisingly the default
template won't work for every project and it's not supposed to.
More information about the erlang-questions
mailing list