[erlang-questions] Dialyzer and erlsom

Alexander Petrovsky askjuise@REDACTED
Tue Sep 8 14:25:38 CEST 2015


Stavros, thanks a lot!

I've tried to run with "-I deps/erlsom/src/", but it's doesn't help, also
I've tried like smth this: "-I include/* deps/*/src/* deps/*/include/*" but
it's doesn't work too. As you suggested I run Dialyzer directly on the
.beam files and it's work perfectly! Thanks!

2015-09-08 13:43 GMT+03:00 Stavros Aronis <aronisstav@REDACTED>:

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


-- 
Петровский Александр / Alexander Petrovsky,

Skype: askjuise
Phone: +7 914 8 820 815
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150908/88e989b0/attachment.htm>


More information about the erlang-questions mailing list