Dialyzer broken in 20.0.5?
opened this issue · comments
Is it possible that Dialyzer is broken/mis-packaged in 20.0.5? I use "20" for running Dialyzer on GitLab-CI and this is a new error. I used to run that CI job without issues before, and my local Dialyzer 20.0.5 works as well.
See https://gitlab.com/triqng/triq/-/jobs/33692481 from https://gitlab.com/triqng/triq/pipelines/12039078.
Error in process <0.302.0> with exit value:
{{badmatch,error},
[{erl_types,type_from_form,6,[{file,"erl_types.erl"},{line,4769}]},
{erl_types,t_form_to_string,1,[{file,"erl_types.erl"},{line,5286}]},
{erl_types,t_form_to_string_list,2,[{file,"erl_types.erl"},{line,5301}]},
{erl_types,t_form_to_string,1,[{file,"erl_types.erl"},{line,5298}]},
{erl_types,t_form_to_string,1,[{file,"erl_types.erl"},{line,5235}]},
{dialyzer_contracts,contract_to_string_1,1,
[{file,"dialyzer_contracts.erl"},{line,108}]},
{dialyzer_dataflow,get_apply_fail_msg,10,
[{file,"dialyzer_dataflow.erl"},{line,642}]},
{dialyzer_dataflow,handle_apply_or_call,10,
[{file,"dialyzer_dataflow.erl"},{line,562}]}]}
so did you try erlang:20.0.4
doesn't have the error? or can do a binary search like is erlang:20.0.1
good?
Thanks, that was a good idea. Trying out the different otp releases for Dialyzer revealed a bug in the gitlab-ci file, which I've since resolved. The bug only surfaced after 20.x and was hidden with earlier versions.
@epretha, Dialyzer, as used in triq/.gitlab-ci.yml, works reliably with the images erlang:20-alpine
and erlang:21-alpine
. I don't recall the config bug, but I'd expect it to work with the Debian-based image, too.
Thanks @Tuncer. But the problem happens in a Lubuntu virtualbox when running OTP 20.3 (dialyzer 3.2.4).
Here is the exact stack trace.
===> Error in dialyzing apps: Analysis failed with error:
{{badmatch,error},
[{erl_types,type_from_form,6,[{file,"erl_types.erl"},{line,4798}]},
{erl_types,t_form_to_string,1,[{file,"erl_types.erl"},{line,5347}]},
{erl_types,t_form_to_string,1,[{file,"erl_types.erl"},{line,5300}]},
{erl_types,t_form_to_string_list,2,[{file,"erl_types.erl"},{line,5362}]},
{erl_types,t_form_to_string,1,[{file,"erl_types.erl"},{line,5359}]},
{dialyzer_contracts,contract_to_string_1,1,
[{file,"dialyzer_contracts.erl"},{line,103}]},
{dialyzer_contracts,extra_contract_warning,6,
[{file,"dialyzer_contracts.erl"},{line,804}]},
{dialyzer_contracts,picky_contract_check,7,
[{file,"dialyzer_contracts.erl"},{line,787}]},
{dialyzer_contracts,get_invalid_contract_warnings_funs,5,
[{file,"dialyzer_contracts.erl"},{line,749}]},
{dialyzer_contracts,get_invalid_contract_warnings_modules,4,
[{file,"dialyzer_contracts.erl"},{line,683}]},
{dialyzer_succ_typings,get_warnings,7,
[{file,"dialyzer_succ_typings.erl"},{line,143}]},
{dialyzer_analysis_callgraph,analyze_callgraph,2,
[{file,"dialyzer_analysis_callgraph.erl"},
{line,248}]},
{dialyzer_analysis_callgraph,analysis_start,3,
[{file,"dialyzer_analysis_callgraph.erl"},
{line,153}]}]}
Last messages in the log cache:
Reading files and computing callgraph... done in 4.17 secs
Removing edges... done in 0.20 secs
I'm seeing the exact same error on a Windows machine with OTP21.0.1, so this is probably unrelated to the docker image.