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

Zoltan Lajos Kis <>
Sat Dec 19 19:16:35 CET 2009


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.
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.
>
>   



More information about the erlang-questions mailing list