<div dir="ltr">Kostis, thanks for your advice. Do I understand correctly, you suggest just run dialyzer without my_app.plt? I'll think about it, looks like it make sense!</div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-08 14:30 GMT+03:00 Kostis Sagonas <span dir="ltr"><<a href="mailto:kostis@cs.ntua.gr" target="_blank">kostis@cs.ntua.gr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 09/08/2015 12:33 PM, Alexander Petrovsky wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi!<br>
<br>
I've built PLTs with the follow commands via Makefile:<br>
<br>
DIALYZER_APPS = asn1 compiler crypto erts inets kernel public_key sasl<br>
ssl stdlib syntax_tools tools<br>
<br>
...<br>
<br>
dialyzer --build_plt --output_plt erlang.plt --apps $(DIALYZER_APPS)<br>
dialyzer --build_plt --output_plt my_app.plt ebin/ deps/*/ebin/<br>
<br>
then I want to check my code with dialyzer but got the follow errors:<br>
<br>
$ make dialyzer<br>
dialyzer --src src --plts erlang.plt my_app.plt -Wunmatched_returns<br>
-Werror_handling -Wrace_conditions -Wunderspecs | fgrep -v -f<br>
./dialyzer.ignore-warnings<br>
   Checking whether the PLT erlang.plt is up-to-date... yes<br>
   Checking whether the PLT my_app.plt is up-to-date... yes<br>
   Proceeding with analysis...<br>
dialyzer: Analysis failed with error:<br></span>
... <SNIP><span class=""><br>
<br>
In my_app_parser I have:<br>
<br>
-include_lib("erlsom/src/erlsom_sax.hrl").<br>
<br>
How to say dialyzer to find erlsom_sax.hrl in deps/erlsom/src/ ? How can<br>
I fix it?<br>
</span></blockquote>
<br>
Stavros has already replied to your question (alas in a top-post :-( ) mentioning the -I option that dialyzer accepts and the fact that you'll be better off analyzing .beam files instead of .erl ones.<br>
<br>
I wanted to point out something else, slightly unrelated to your question, because it's a common error I see in the use of dialyzer.<br>
<br>
You start by building an erlang.plt file for all Erlang/OTP apps you are using.  That's great.  But then you are building a PLT not only for the dependencies of your application, which is fine, but also for the files (those under ebin/) that you want to then analyze.  Why do you do that?  There is no real harm in doing so, but this means that if you subsequently modify any of the files under your src/ and re-compile, the information in the cached my_app.plt file will need to be rebuilt.<br>
<br>
The idea of PLT files is that you cache there type information of files that are considered as the "trusted base" of dialyzer's analysis, which consists of files that rarely change (like those in the Erlang/OTP system you employ).<br>
<br>
So, I would argue against building/including in the PLT any information about the files of the application you want to dialyze.<span class="HOEnZb"><font color="#888888"><br>
<br>
Kostis</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: +7 914 8 820 815<div><br></div></div></div></div>
</div>