[erlang-bugs] Erlang 17 dialyzer issue with queue:queue(T).

Shayan Pooya <>
Thu Apr 17 19:56:46 CEST 2014


We currently use the nowarn_deprecated_type option to compile Disco with
Erlang 17.  I wanted to update the code to avoid using this option but I
get an error message from dialyzer after updating one of the types from
dict() to dict:dict(non_neg_integer) or dict:dict().
(error message at the end of this message, the change the results in this
error is https://github.com/pooya/disco/commit/f857bde).

Which basically says worker_throttle:state() does not match itself.


disco_worker.erl:76: Invalid type specification for function
disco_worker:init/1. The success typing is
({atom(),{#task_spec{jobname::'undefined' | [any(),...],stage::'undefined'
| binary(),taskid::'undefined' | non_neg_integer(),tasknum::'undefined' |
integer(),grouping::'group_all' | 'group_label' | 'group_node' |
'group_node_label' | 'split',group::{_,_},job_coord::'undefined' |
pid(),jobenvs::'undefined' | [any()],worker::'undefined' |
binary(),schedule::'local' | 'none' | 'remote' |
'undefined',input::'undefined' | [any()],save_outputs::'false' | 'true' |
'undefined',save_info::'undefined' | [any()]},#task_run{runid::'undefined'
| non_neg_integer(),host::'none' | 'undefined' |
[any(),...],failed_hosts::'undefined' | gb_sets:set(_),input::[any()]}}})
->
{'ok',#state{master::atom(),task::{{_,_,_,_,_,_,_,_,_,_,_,_,_,_},{_,_,_,_,_}},port::'none',worker_send::'none',error_output::'false',buffer::<<>>,parser::worker_protocol:state(),runtime::{'state','undefined'
| [any(),...],{_,_},atom(),[any(),...],{_,_,_,_},{_,_,_},'false' | 'true' |
'undefined','undefined' |
[any()],'none',gb_sets:set(_),[],gb_trees:tree(_,_),'none','none'},throttle::worker_throttle:state()}}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140417/cedda30b/attachment.html>


More information about the erlang-bugs mailing list