[erlang-patches] dialyzer: Report specs defining 'incorrect' lists as return types

Fredrik <>
Mon Dec 17 11:42:58 CET 2012


Hello again,
So what you are saying is that it is the patch that is reporting column 
numbers and the patch that is removing unused mnemosyne code?
Neither of these patches has been graduated, they are in master-pu, the 
same as your patch.
I will discuss with the responsible developers of the applications 
concerned here and get back to you.

BR Fredrik Gustafsson
Erlang OTP Team
On 12/17/2012 11:21 AM, Stavros Aronis wrote:
> Btw,
>
> the different error I get on master-pu comes from a very weird error 
> on mnesia:
>
> On mnesia.erl, line 2739 there is a call to missing function 
> mnesia:get_activity_id/0.
>
> This function was removed in commit 
> 6f4c3d127e33d59ac87a3c3b600f7a7280c9674a, part of the patch that 
> removes unused mnemosyne code.
>
> Regards,
>
>
> On Mon, Dec 17, 2012 at 11:09 AM, Stavros Aronis < 
> <mailto:>> wrote:
>
>     Hi Fredrik,
>
>     Running the tests on my branch (which is rebased on maint) does
>     not yield any errors.
>
>     Running the tests on master-pu, I get a different error.
>
>     By manually running the test I can see that the error that you
>     report comes from what I would guess is the new extension that
>     reports column numbers along file lines.
>
>     Has this patch graduated on master? What is the suggested course
>     of action?
>
>     Regards,
>
>     Stavros
>
>
>     On Mon, Dec 17, 2012 at 10:22 AM, Fredrik <
>     <mailto:>> wrote:
>
>         Hello Stavros!
>         This fails:
>         'small_SUITE : empty_list_infimum'
>         with reason:
>         dialyzer:format_warning failed on line 295 Reason: function_clause
>         On all platforms..
>         Please fix this, and I will re-fetch.
>
>
>         BR Fredrik Gustafsson
>         Erlang OTP Team
>         On 12/14/2012 10:11 AM, Stavros Aronis wrote:
>>         This patch enables Dialyzer to detect cases where a function
>>         has a specification for a return type containing some list
>>         with elements different than those Dialyzer's own algorithm
>>         can infer e.g. a function specified to return [atom()] when
>>         actually [[atom()]] is returned.
>>
>>         Previously Dialyzer remained silent under normal operation,
>>         seeing that these two types have the empty list as a common
>>         element, so the spec was not 'completely irrelevant'.
>>
>>         Using this patch one can find discrepancies in the specs of
>>         stdlib's sys.erl and erl_scan.erl. Kostis and I are in
>>         contact with the OTP team for the best way fix those as well.
>>
>>           git fetch git://github.com/aronisstav/otp.git
>>         <http://github.com/aronisstav/otp.git> dialyzer-list-spec
>>
>>         Regards,
>>
>>         Stavros
>>
>>         ---
>>
>>         The new warnings are:
>>
>>         sys.erl:303: Invalid type specification for function
>>         sys:handle_debug/4. The success typing is ([{_,_}],_,_,_) ->
>>         [{_,_}]
>>         erl_scan.erl:204: Invalid type specification for function
>>         erl_scan:token_info/2. The success typing is (_,'category' |
>>         'column' | 'length' | 'line' | 'location' | 'symbol' | 'text'
>>         | maybe_improper_list('category' | 'column' | 'length' |
>>         'line' | 'location' | 'symbol' | 'text','category' | 'column'
>>         | 'length' | 'line' | 'location' | 'symbol' | 'text' | []))
>>         -> 'undefined' | maybe_improper_list({_,_},'undefined' | [] |
>>         {_,_}) | {_,_}
>>         erl_scan.erl:242: Invalid type specification for function
>>         erl_scan:attributes_info/2. The success typing is (_,'column'
>>         | 'length' | 'line' | 'location' | 'text' |
>>         maybe_improper_list('column' | 'length' | 'line' | 'location'
>>         | 'text','column' | 'length' | 'line' | 'location' | 'text' |
>>         [])) -> 'undefined' | maybe_improper_list({_,_},'undefined' |
>>         [] | {_,_}) | {_,_}
>>
>>
>>
>>
>>         _______________________________________________
>>         erlang-patches mailing list
>>           <mailto:>
>>         http://erlang.org/mailman/listinfo/erlang-patches
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20121217/d72708be/attachment-0001.html>


More information about the erlang-patches mailing list