[erlang-questions] Dialyzer and erlsom

Stavros Aronis aronisstav@REDACTED
Tue Sep 8 12:43:53 CEST 2015


Hi Alexander,

when it comes to included files (or parse transforms), Dialyzer accepts the
same flags as the compiler. In your case adding "-I deps/erlsom/src/"
should be enough.

It is however *much* simpler to just make sure that you compile your code
with "+debug_info" and run Dialyzer directly on the .beam file(s).

Best,

Stavros Aronis

On Tue, Sep 8, 2015 at 12:33 PM, Alexander Petrovsky <askjuise@REDACTED>
wrote:

> Hi!
>
> I've built PLTs with the follow commands via Makefile:
>
> DIALYZER_APPS = asn1 compiler crypto erts inets kernel public_key sasl ssl
> stdlib syntax_tools tools
>
> ...
>
> dialyzer --build_plt --output_plt erlang.plt --apps $(DIALYZER_APPS)
> dialyzer --build_plt --output_plt my_app.plt ebin/ deps/*/ebin/
>
> then I want to check my code with dialyzer but got the follow errors:
>
> $ make dialyzer
> dialyzer --src src --plts erlang.plt my_app.plt -Wunmatched_returns
> -Werror_handling -Wrace_conditions -Wunderspecs | fgrep -v -f
> ./dialyzer.ignore-warnings
>   Checking whether the PLT erlang.plt is up-to-date... yes
>   Checking whether the PLT my_app.plt is up-to-date... yes
>   Proceeding with analysis...
> dialyzer: Analysis failed with error:
> Could not scan the following file(s):
> /home/juise/my_app/src/my_app_parser.erl:10: can't find include lib
> "erlsom/src/erlsom_sax.hrl"
> /home/juise/my_app/src/my_app_parser.erl:99: record attribute undefined
> /home/juise/my_app/src/my_app_parser.erl:100: variable 'Name' is unbound
> /home/juise/my_app/src/my_app_parser.erl:100: variable 'Name' is unbound
> /home/juise/my_app/src/my_app_parser.erl:100: variable 'Value' is unbound
>
> In my_app_parser I have:
>
> -include_lib("erlsom/src/erlsom_sax.hrl").
>
> How to say dialyzer to find erlsom_sax.hrl in deps/erlsom/src/ ? How can I
> fix it?
>
> --
> Петровский Александр / Alexander Petrovsky,
>
> Skype: askjuise
> Phone: +7 914 8 820 815
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150908/4c520eac/attachment.htm>


More information about the erlang-questions mailing list