[erlang-questions] clarify: why does Dialyzer have an implicit dependency on Mnesia?

Eric Merritt <>
Thu Dec 13 00:37:13 CET 2007

I understand my issue now. It was a combination of two problems. The
first is that I was using an undocumented api to generate a plt file
from the erlang. This API went away at some point, it was undocumented
so thats expected. However, with dialyzer no longer being told to
output a plt file and it not having a plt file available it tried to
create one. Since it used its defaults for this and mnesia wasn't
available it bombed out. It might be worth adding a check in the
generation loop just to check and make sure that the required libs
are, in fact, available.

On Dec 12, 2007 12:16 PM, Kostis Sagonas <> wrote:
> Eric Merritt wrote:
> > Guys,
> >
> > Dialyzer seems to have an implicit dependency on Mnesia. Mnesia isn't
> > specified as a dependency in dialyzer.app, nor does dialyzer ever
> > actually call any of the Mnesia APIs.  However, dialyzer attempts to
> > get information about mnesia in dialyzer_plt. It makes use of a list
> > of default libraries provided by the dialyzer header. Why is this? If
> > there actually is a dependency shouldn't dialyzer have mnesia listed
> > as a dependency in its .app file? If its not a dependency why try to
> > retrieve information about it with the code module?
> I am not 100% sure what you are referring to, but most probably you are
> talking about the fact that by default Dialyzer builds (or these days
> comes with) an initial PLT (Persistent Lookup Table) of the following
> applications: [kernel,stdlib,mnesia]
> This is done so that there is cached type information about functions
> that an application might be using -- thereby avoiding having to include
> modules of these applications in each analysis and repeatedly analyzing
> these modules. However, dialyzer needs to check that the cached type
> information is still valid (i.e. has not changed since the time when the
> PLT was built) and thus checks that the .beam files have not changed by
> comparing their checksums with the current one. Thus, it needs to be
> able to locate these .beam files.
> In principle, no application is needed in PLT or more than the above
> three could be added, so if it bothers you feel free to take mnesia out
> of the set of applications in the PLT (these are specified in dialyzer's
> Makefile) and rebuild the PLT.
> Hope this answers your question.
> Kostis

More information about the erlang-questions mailing list