[erlang-questions] Dialyzer, behaviours, plts and what not

Brujo Benavides <>
Tue Jan 5 20:26:56 CET 2016


Fred:
	In your example, dialyzer is analysing both apps _at the same time_ ;)
	In the original, first_app was a dependency for second_app, therefore bad_behaviour was in the pit but not in the path when dialyzer analysed second_app.
	To actually make it work with rebar3 and replicate the issue you will need to split the app into 2 repos, I presume.
	Cheers!

> On Jan 5, 2016, at 16:22, Fred Hebert <> wrote:
> 
> On 01/05, Brujo Benavides wrote:
>> We reduced the issue to its smallest possible expression and uploaded it here <https://github.com/elbrujohalcon/dialyzeit>.
>> 
> 
> Interestingly enough, I can't replicate the bug after adapting the repository to work in rebar3. Here's 100% of the procedure to replicate the fix:
> 
>   λ dialyzeit → master → mkdir apps
>   λ dialyzeit → master → mv first_app apps/
>   λ dialyzeit → master* → mv second_app apps/
>   λ dialyzeit → master* → rebar3 dialyzer
>   ===> Verifying dependencies...
>   ===> Compiling first
>   ===> Compiling second
>   ===> Dialyzer starting, this may take a while...
>   ===> Updating plt...
>   ===> Resolving files...
>   ===> Checking 157 files in "/private/tmp/dialyzeit/_build/default/rebar3_18.2_plt"...
>   ===> Doing success typing analysis...
>   ===> Resolving files...
>   ===> Analyzing 4 files with "/private/tmp/dialyzeit/_build/default/rebar3_18.2_plt"...
> 
>   _build/default/lib/first/src/good_child.erl
>   12: The inferred return type of bad/0 ('not_bad') has nothing in common with 'bad', which is the expected return type for the callback of bad_behaviour behaviour
> 
>   _build/default/lib/second/src/bad_child.erl
>   13: The inferred return type of bad/0 ('not_bad') has nothing in common with 'bad', which is the expected return type for the callback of bad_behaviour behaviour
>   ===> Warnings written to /private/tmp/dialyzeit/_build/default/18.2.dialyzer_warnings
>   ===> Warnings occured running dialyzer: 2
> 
> This would make me think the issue is in the environment configuration and/or project structure more than anything else.
> 
> Regards,
> Fred.



More information about the erlang-questions mailing list