[erlang-questions] Identifying modules to load in a release file

Doug Fort doug.fort@REDACTED
Sat Dec 19 19:23:50 CET 2009


On Sat, Dec 19, 2009 at 1:16 PM, Zoltan Lajos Kis <kiszl@REDACTED> wrote:

> All modules should be be grouped into applications. Mnesia is an
> application, however ets is just a module: it is part of the stdlib
> application.
>
> Each application has a .app file (usually in the ebin dir) that tells the
> version of the application and lists other applications it depends on.
> Basically if you ever have an application:start(App) in your sources, it
> should go here.
> An example my_app.app, that shows the app is version 0.1, and depends on
> four applications:
>
> {application, my_app,
>  [{description, "My Application"},
>   {vsn, "0.1"},
>   ...
>   {applications, [mnesia, sasl, stdlib, kernel]},
>   ...
>  ]
> }.
>
> Based on these files you should be able to gather the list of all
> applications you would like to start, and applications they depend on.
>

How do I find the applications they depend on? That's my real question. I
have an application that works fine in interactive mode, but one of its
event handlers doesn't work right in embedded mode. I assume there's
something I'm failing to load, but I am anumable to tell what it is from the
documentation.




> You can get the version of each application from the .app file (or from the
> directory name).
> So the 0.1 release of my_thing for R13B03 should look like:
>
> {release, {"my_thing", "0.1"}, {erts, "5.7.4"},
>  [{my_app, "0.1"},
>   {mnesia, "4.4.12"},
>   {sasl, "2.1.8"},
>   {stdlib, "1.16.4"},
>   {kernel, "2.13.4"}
>  ]
> }.
>
> Regards,
> Zoltan.
>
> PS.: I guess kernel and stdlib is started anyway, so you don't need to
> explicitly list them. It probably doesn't make any harm though.
>
>
> Doug Fort wrote:
>
>> How can one identify which library modules to put in the .rel file? For
>> example, if a process uses the ets term storage, you must add {mnesia,
>> "4.4.12"} to the release file. I suspect I'm missing something obvious,
>> but
>> I haven't found a straightforward way determine this.
>>
>>
>>
>
>


-- 
Doug Fort, Consulting Programmer
http://www.dougfort.com


More information about the erlang-questions mailing list