[erlang-questions] Dialyzer input file types
Robert Virding
rvirding@REDACTED
Sun Apr 5 18:26:18 CEST 2015
A funny thing with dialyzer is that it works on Core erlang but only gets
the core erlang from either the AST in 'debug_info' compiled .beam files or
from .erl. There is no pluggable method to get the core erlang. Very
extensible unfriendly.
I have done some special hacks in the dialyzer input files which allow it
to get the core data from .lfe files. It was quite simple to do and works
like a charm.
It would be quite easy to extend this so it could take files of any kind in
a pluggable way. For every file type there would be a module which extracts
the core forms for that type, so for example for .foo files there should be
a module 'dialyzer_foo_utils'. By setting the code path you could make sure
it finds your specific files.
I *know* this should be fixed by adding an option to the erlang compiler to
include the Core forms in the .beam files and getting dialyzer to get its
Core data from there as well, but there seems to be little interest in
either camp to fix this problem.
Robert
P.S. You are aware that compiling with debug_info does add the erlang AST
to the .beam file so the source code is actually included?
On 4 April 2015 at 04:22, Robert Virding <rvirding@REDACTED> wrote:
> Why does dialyzer only allow me to input either all source (.erl) files or
> all .beam files? Or does it allow mixing and I have missed the option? I
> can't see any logical reason why it should not allow mixing.
>
> Robert
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150405/5587dc88/attachment.htm>
More information about the erlang-questions
mailing list