Closed jannamamer closed 4 years ago
Hi, can you please run mix dialyzer --format raw
and paste the results?
Hi @jeremyjh, apologies for the late revert. Below is the result.
Finding suitable PLTs
Checking PLT...
[:absinthe, :absinthe_ecto, :absinthe_plug, :asn1, :bamboo, :base64url, :certifi, :combine, :comeonin, :compiler, :connection, :cors_plug, :cowboy, :cowlib, :crypto, :data, :db_connection, :decimal, :distillery, :ecto, :ecto_sql, :edeliver, :eex, :elixir, :ex_crypto, :file_system, :geo, :geo_postgis, :gettext, :guardian, :guardian_db, :hackney, :httpoison, :idna, :jason, :jose, :kernel, :logger, :metrics, :mime, :mimerl, :oauth2, :phoenix, :phoenix_html, :phoenix_live_reload, :phoenix_pubsub, :plug, :plug_cowboy, :plug_crypto, :poison, ...]
PLT is up to date!
No :ignore_warnings opt specified in mix.exs and default does not exist.
Starting Dialyzer
[
check_plt: false,
init_plt: '/home/username/projectname/_build/dev/dialyxir_erlang-21.3.6_elixir-1.9.1_deps-dev.plt',
files_rec: ['/home/username/projectname/_build/dev/lib/api/ebin',
'/home/username/projectname/_build/dev/lib/data/ebin'],
warnings: [:unknown]
]
done in 0m14.84s
{:warn_unknown, {[], 0}, {:unknown_function, {Data.Repo, :get, 2}}}
{:warn_unknown, {[], 0}, {:unknown_function, {UserContext, :change_password, 1}}}
{:warn_unknown, {[], 0}, {:unknown_function, {UserContext, :validate_params, 3}}}
{:warn_return_no_exit, {'lib/api/sliding_logout.ex', 23}, {:no_return, [:only_normal, :logout_user, 2]}}
{:warn_failing_call, {'lib/api/sliding_logout.ex', 26}, {:call, [Plug.Conn, :configure_session, '(\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'adapter\':={atom(),_}, \'assigns\':=\#{atom()=>_}, \'before_send\':=[fun((\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'adapter\':={_,_}, \'assigns\':=map(), \'before_send\':=[fun((_) -> any())], _=>_}) -> \#{\'__struct__\':=\'Elixir.Plug.Conn\', \'adapter\':={_,_}, \'assigns\':=map(), \'before_send\':=[fun((_) -> any())], _=>_})], \'body_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | \#{binary()=>_}] | \#{binary()=>binary() | [any()] | \#{binary()=>_}}}, \'cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'halted\':=_, \'host\':=binary(), \'method\':=binary(), \'owner\':=pid(), \'params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | \#{binary()=>_}] | \#{binary()=>binary() | [any()] | \#{binary()=>_}}}, \'path_info\':=[binary()], \'path_params\':=\#{binary()=>binary() | [binary() | [any()] | \#{binary()=>_}] | \#{binary()=>binary() | [any()] | \#{binary()=>_}}}, \'port\':=char(), \'private\':=\#{atom()=>_}, \'query_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | \#{binary()=>_}] | \#{binary()=>binary() | [any()] | \#{binary()=>_}}}, \'query_string\':=binary(), \'remote_ip\':={byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()}, \'req_cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'req_headers\':=[{binary(),binary()}], \'request_path\':=binary(), \'resp_body\':=\'nil\' | binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []), \'resp_cookies\':=\#{binary()=>\#{}}, \'resp_headers\':=[{binary(),binary()}], \'scheme\':=\'http\' | \'https\', \'script_name\':=[binary()], \'secret_key_base\':=\'nil\' | binary(), \'state\':=\'chunked\' | \'file\' | \'sent\' | \'set\' | \'set_chunked\' | \'set_file\' | \'unset\', \'status\':=\'nil\' | non_neg_integer()},[\'renew\',...])', [2], :both, '(\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'private\':=map(), _=>_},\'nil\' | [{atom(),_}] | map())', '\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'private\':=map(), _=>_}', {true, '(t(),\'Elixir.Keyword\':t()) -> t()'}]}}
{:warn_matching, {'lib/api_web/controllers/v1/memberlink/user_controller.ex', 121}, {:pattern_match, ['pattern <{\'error_message\', _result@1}, _, _conn@1>', '<<<_:64,_:_*8>> | {\'ok\',<<_:96>> | map()},<<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/memberlink/user_controller.ex', 135}, {:pattern_match, ['pattern <{\'error_message\', _message@1}, _json_name@1, _conn@1>', '<<<_:64,_:_*8>>,<<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/memberlink/user_controller.ex', 142}, {:pattern_match, ['pattern <{\'error_person\', _message@1}, _, _conn@1>', '<<<_:64,_:_*8>>,<<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/memberlink/user_controller.ex', 156}, {:pattern_match_cov, ['pattern <_result@1, _json@1, _conn@1>', '<<<_:64,_:_*8>> | {\'error\',_} | {\'ok\',<<_:96>> | map()},<<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/memberlink/user_controller.ex', 163}, {:pattern_match_cov, ['pattern <_message@1, _, _conn@1>', '<<<_:64,_:_*8>> | {\'error\',_} | {\'ok\',<<_:96>> | map()},<<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/session_controller.ex', 117}, {:pattern_match, ['pattern <{\'error\', \'account_locked\'}, _conn@1, _>', '<{\'ok\',\'nil\' | [map()] | \#{atom()=>_}} | {\'ok\',\'nil\' | [map()] | \#{atom()=>_},_},_,\'v1\' | \'v2\'>']}}
{:warn_callgraph, {'lib/api_web/controllers/v1/session_controller.ex', 134}, {:call_to_missing, [Data.Contexts.V1.UserContext, :get_user, 3]}}
{:warn_failing_call, {'lib/api_web/controllers/v1/session_controller.ex', 282}, {:call, [Api.Guardian.Plug, :sign_in, '(_conn@1::any(),_secure@1::<<_:8,_:_*1>>,[{\'pem\',\#{\'approval_limits\':=[any()], \'full_access\':=[any()], \'view_only\':=[any()]}} | {\'pii\',_},...])', [3], :only_sig, '(\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'adapter\':={atom(),_}, \'assigns\':=\#{atom()=>_}, \'before_send\':=[fun((map()) -> map())], \'body_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'halted\':=_, \'host\':=binary(), \'method\':=binary(), \'owner\':=pid(), \'params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'path_info\':=[binary()], \'path_params\':=\#{binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'port\':=char(), \'private\':=\#{atom()=>_}, \'query_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'query_string\':=binary(), \'remote_ip\':={byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()}, \'req_cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'req_headers\':=[{binary(),binary()}], \'request_path\':=binary(), \'resp_body\':=\'nil\' | binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []), \'resp_cookies\':=\#{binary()=>\#{}}, \'resp_headers\':=[{binary(),binary()}], \'scheme\':=\'http\' | \'https\', \'script_name\':=[binary()], \'secret_key_base\':=\'nil\' | binary(), \'state\':=\'chunked\' | \'file\' | \'sent\' | \'set\' | \'set_chunked\' | \'set_file\' | \'unset\', \'status\':=\'nil\' | non_neg_integer()},any(),map())', '\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'adapter\':={atom(),_}, \'assigns\':=\#{atom()=>_}, \'before_send\':=[fun((map()) -> map())], \'body_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'halted\':=_, \'host\':=binary(), \'method\':=binary(), \'owner\':=pid(), \'params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'path_info\':=[binary()], \'path_params\':=\#{binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'port\':=char(), \'private\':=\#{atom()=>_}, \'query_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'query_string\':=binary(), \'remote_ip\':={byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()}, \'req_cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'req_headers\':=[{binary(),binary()}], \'request_path\':=binary(), \'resp_body\':=\'nil\' | binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []), \'resp_cookies\':=\#{binary()=>\#{}}, \'resp_headers\':=[{binary(),binary()}], \'scheme\':=\'http\' | \'https\', \'script_name\':=[binary()], \'secret_key_base\':=\'nil\' | binary(), \'state\':=\'chunked\' | \'file\' | \'sent\' | \'set\' | \'set_chunked\' | \'set_file\' | \'unset\', \'status\':=\'nil\' | non_neg_integer()}', {false, :none}]}}
{:warn_not_called, {'lib/api_web/controllers/v1/session_controller.ex', 302}, {:unused_fun, [:success_login_accountlink, 5]}}
{:warn_matching, {'lib/api_web/controllers/v1/session_controller.ex', 345}, {:pattern_match_cov, ['pattern <\'nil\', _conn@1>', '<\'nil\' | binary(),_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/session_controller.ex', 352}, {:pattern_match_cov, ['pattern <_conn@1, __params@1>', '<_,_>']}}
{:warn_failing_call, {'lib/api_web/controllers/v1/session_controller.ex', 514}, {:call, [Api.Guardian.Plug, :sign_in, '(_conn@1::any(),_secure@1::<<_:8,_:_*1>>,[{\'account_code\',_} | {\'account_name\',_},...])', [3], :only_sig, '(\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'adapter\':={atom(),_}, \'assigns\':=\#{atom()=>_}, \'before_send\':=[fun((map()) -> map())], \'body_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'halted\':=_, \'host\':=binary(), \'method\':=binary(), \'owner\':=pid(), \'params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'path_info\':=[binary()], \'path_params\':=\#{binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'port\':=char(), \'private\':=\#{atom()=>_}, \'query_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'query_string\':=binary(), \'remote_ip\':={byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()}, \'req_cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'req_headers\':=[{binary(),binary()}], \'request_path\':=binary(), \'resp_body\':=\'nil\' | binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []), \'resp_cookies\':=\#{binary()=>\#{}}, \'resp_headers\':=[{binary(),binary()}], \'scheme\':=\'http\' | \'https\', \'script_name\':=[binary()], \'secret_key_base\':=\'nil\' | binary(), \'state\':=\'chunked\' | \'file\' | \'sent\' | \'set\' | \'set_chunked\' | \'set_file\' | \'unset\', \'status\':=\'nil\' | non_neg_integer()},any(),map())', '\#{\'__struct__\':=\'Elixir.Plug.Conn\', \'adapter\':={atom(),_}, \'assigns\':=\#{atom()=>_}, \'before_send\':=[fun((map()) -> map())], \'body_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'halted\':=_, \'host\':=binary(), \'method\':=binary(), \'owner\':=pid(), \'params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'path_info\':=[binary()], \'path_params\':=\#{binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'port\':=char(), \'private\':=\#{atom()=>_}, \'query_params\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary() | [binary() | [any()] | map()] | \#{binary()=>binary() | [any()] | map()}}, \'query_string\':=binary(), \'remote_ip\':={byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()}, \'req_cookies\':=\#{\'__struct__\'=>\'Elixir.Plug.Conn.Unfetched\', \'aspect\'=>atom(), binary()=>binary()}, \'req_headers\':=[{binary(),binary()}], \'request_path\':=binary(), \'resp_body\':=\'nil\' | binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []), \'resp_cookies\':=\#{binary()=>\#{}}, \'resp_headers\':=[{binary(),binary()}], \'scheme\':=\'http\' | \'https\', \'script_name\':=[binary()], \'secret_key_base\':=\'nil\' | binary(), \'state\':=\'chunked\' | \'file\' | \'sent\' | \'set\' | \'set_chunked\' | \'set_file\' | \'unset\', \'status\':=\'nil\' | non_neg_integer()}', {false, :none}]}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 153}, {:pattern_match_cov, ['pattern <_message@1, \'success\', _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 168}, {:pattern_match_cov, ['pattern <{\'error\', _changeset@1}, _, _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 169}, {:pattern_match_cov, ['pattern <_message@1, \'success\', _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 170}, {:pattern_match_cov, ['pattern <_message@1, _, _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_not_called, {'lib/api_web/controllers/v1/user_controller.ex', 172}, {:unused_fun, [:success_json, 3]}}
{:warn_not_called, {'lib/api_web/controllers/v1/user_controller.ex', 179}, {:unused_fun, [:error_json, 2]}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 186}, {:pattern_match_cov, ['pattern <{\'ok\', _user@1 = \#{\'mobile\':=_mobile@1, \'type\':=_type@1}}, _json_name@1, _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 193}, {:pattern_match_cov, ['pattern <{\'ok\', _user@1}, _json_name@1, _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 200}, {:pattern_match_cov, ['pattern <{\'error\', _changeset@1}, _, _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 207}, {:pattern_match_cov, ['pattern <_message@1, _, _conn@1>', '<_,\'success\' | <<_:64,_:_*8>>,_>']}}
{:warn_matching, {'lib/api_web/controllers/v1/user_controller.ex', 220}, {:pattern_match_cov, ['pattern <_conn@1, __params@1>', '<_,_>']}}
{:warn_matching, {'lib/api_web/plugs/guardian.ex', 18}, {:pattern_match_cov, ['pattern <_, _>', '<_,_>']}}
{:warn_matching, {'lib/api_web/plugs/guardian.ex', 28}, {:pattern_match_cov, ['variable __claims@1', 'any()']}}
{:warn_matching, {'lib/contexts/user_context.ex', 362}, {:pattern_match_cov, ['pattern <_user@1 = \#{\'__struct__\':=\'Elixir.Data.Schemas.User\'}, _params@1>', '<_,_>']}}
{:warn_matching, {'lib/contexts/user_context.ex', 962}, {:pattern_match, ['pattern <{_user@1, \'nil\'}, \'email\', _value@1, _>', '<\'nil\' | {_,\#{\'username\':=_, _=>_}},\'email\' | \'mobile\',_,_>']}}
{:warn_matching, {'lib/contexts/user_context.ex', 965}, {:pattern_match, ['pattern <{_user@1, \'nil\'}, \'mobile\', _value@1, _>', '<\'nil\' | {_,\#{\'username\':=_, _=>_}},\'email\' | \'mobile\',_,_>']}}
{:warn_matching, {'lib/contexts/user_context.ex', 989}, {:pattern_match, ['pattern <{_user@1, \'nil\'}, \'email\', _value@1, _, _, \'sso\'>', '<\'nil\' | {_,\#{\'username\':=_, _=>_}},\'email\' | \'mobile\',_,_,_,\'sso\'>']}}
{:warn_matching, {'lib/contexts/user_context.ex', 992}, {:pattern_match, ['pattern <{_user@1, \'nil\'}, \'mobile\', _value@1, _, _, \'sso\'>', '<\'nil\' | {_,\#{\'username\':=_, _=>_}},\'email\' | \'mobile\',_,_,_,\'sso\'>']}}
{:warn_matching, {'lib/contexts/user_context.ex', 1333}, {:pattern_match_cov, ['variable _user@1', 'any()']}}
{:warn_matching, {'lib/contexts/user_context.ex', 1341}, {:pattern_match_cov, ['variable _user@1', 'any()']}}
{:warn_matching, {'lib/contexts/user_context.ex', 1663}, {:pattern_match, ['pattern {{\'error\', _changeset@1}, _}', '{{\'bad_request\',_} | {\'not_found\',[any(),...]} | {\'ok\',map()},atom() | \#{\'changes\':=_, _=>_}}']}}
{:warn_matching, {'lib/contexts/user_context.ex', 1701}, {:pattern_match_cov, ['variable _', '\#{\'__struct__\':=\'Elixir.Bamboo.Email\', \'assigns\':=\#{atom()=>_}, \'bcc\':=binary() | {binary(),binary()}, \'cc\':=binary() | {binary(),binary()}, \'from\':=binary() | {binary(),binary()}, \'headers\':=\#{binary()=>binary()}, \'html_body\':=\'nil\' | binary(), \'private\':=\#{atom()=>_}, \'subject\':=\'nil\' | binary(), \'text_body\':=\'nil\' | binary(), \'to\':=binary() | {binary(),binary()}}']}}
{:warn_not_called, {'lib/contexts/user_context.ex', 1707}, {:unused_fun, [:delete_username_pii, 2]}}
{:warn_matching, {'lib/contexts/user_context.ex', 1815}, {:pattern_match_cov, ['pattern _changeset@1 = \#{\'changes\':=\#{\'username\':=_username@1}}', 'any()']}}
{:warn_matching, {'lib/contexts/user_context.ex', 1820}, {:pattern_match_cov, ['variable _changeset@1', 'any()']}}
{:warn_matching, {'lib/contexts/user_context.ex', 1903}, {:pattern_match_cov, ['pattern <_changeset@1, _conn@1>', '<_,_>']}}
{:warn_matching, {'lib/contexts/user_context.ex', 1925}, {:pattern_match_cov, ['pattern <_user_id@1, _password@1, \'register\'>', '<_,_,\'register\'>']}}
{:warn_matching, {'lib/contexts/user_context.ex', 2360}, {:pattern_match, ['pattern _changeset@1 = \#{\'changes\':=\#{\'email_mobile\':=_email_mobile@1}}', 'atom() | \#{\'changes\':=\#{\'email_mobile\'=>none(), _=>_}, _=>_}']}}
{:warn_matching, {'lib/contexts/user_context.ex', 2371}, {:pattern_match_cov, ['pattern _changeset@1 = \#{\'valid?\':=\'false\'}', '{\'email\',\#{\'changes\':=map(), _=>_}} | {\'invalid\',\#{\'changes\':=map(), _=>_}} | {\'mobile\',\#{\'changes\':=map(), _=>_}} | \#{\'changes\':=map(), \'valid?\':=\'false\', _=>_}']}}
{:warn_matching, {'lib/contexts/user_context.ex', 2372}, {:pattern_match_cov, ['pattern {\'invalid\', _changeset@1}', '{\'email\',\#{\'changes\':=map(), _=>_}} | {\'invalid\',\#{\'changes\':=map(), _=>_}} | {\'mobile\',\#{\'changes\':=map(), _=>_}} | \#{\'changes\':=map(), \'valid?\':=\'false\', _=>_}']}}
{:warn_matching, {'lib/contexts/user_context.ex', 2373}, {:pattern_match_cov, ['pattern {\'email\', _changeset@1}', '{\'email\',\#{\'changes\':=map(), _=>_}} | {\'invalid\',\#{\'changes\':=map(), _=>_}} | {\'mobile\',\#{\'changes\':=map(), _=>_}} | \#{\'changes\':=map(), \'valid?\':=\'false\', _=>_}']}}
{:warn_matching, {'lib/contexts/user_context.ex', 2374}, {:pattern_match_cov, ['pattern {\'mobile\', _changeset@1}', '{\'email\',\#{\'changes\':=map(), _=>_}} | {\'invalid\',\#{\'changes\':=map(), _=>_}} | {\'mobile\',\#{\'changes\':=map(), _=>_}} | \#{\'changes\':=map(), \'valid?\':=\'false\', _=>_}']}}
{:warn_matching, {'lib/contexts/utility_context.ex', 226}, {:pattern_match_cov, ['variable _changeset@1', 'any()']}}
{:warn_matching, {'lib/contexts/v1/role_context.ex', 148}, {:exact_eq, ['binary()', :==, '\'nil\'']}}
{:warn_matching, {'lib/contexts/v1/role_context.ex', 216}, {:pattern_match_cov, ['variable _changeset@1', '\#{\'__struct__\':=\'Elixir.Ecto.Changeset\', \'action\':=\'delete\' | \'ignore\' | \'insert\' | \'nil\' | \'replace\' | \'update\', \'changes\':=\#{\'permissions\':=_, _=>_}, \'constraints\':=[any()], \'data\':=\'nil\' | map(), \'empty_values\':=_, \'errors\':=[any()], \'filters\':=map(), \'params\':=\'nil\' | map(), \'prepare\':=[any()], \'repo\':=atom(), \'repo_opts\':=[any()], \'required\':=[any()], \'types\':=\'nil\' | map(), \'valid?\':=\'true\', \'validations\':=[any()]}']}}
{:warn_matching, {'lib/contexts/v1/role_context.ex', 579}, {:pattern_match, ['pattern <\'nil\', _, _>', '<integer(),non_neg_integer(),_>']}}
{:warn_matching, {'lib/contexts/v1/role_context.ex', 743}, {:pattern_match, ['pattern <\'nil\', _>', '<map(),\'application\' | \'create_full_access\' | \'cut_off_dates\' | \'description\' | \'is_allowed_view_pii\' | \'landing_page\' | \'name\' | \'no_of_days\'>']}}
{:warn_matching, {'lib/contexts/v1/session_context.ex', 172}, {:pattern_match, ['pattern \'true\'', '\'false\'']}}
{:warn_matching, {'lib/contexts/v1/session_context.ex', 195}, {:pattern_match, ['pattern \'true\'', '\'false\'']}}
{:warn_matching, {'lib/contexts/v1/session_context.ex', 654}, {:pattern_match_cov, ['variable _changeset@1', '\#{\'__struct__\':=\'Elixir.Ecto.Changeset\', \'action\':=\'delete\' | \'ignore\' | \'insert\' | \'nil\' | \'replace\' | \'update\', \'changes\':=\#{atom()=>_}, \'constraints\':=[map()], \'data\':=\'nil\' | map(), \'empty_values\':=_, \'errors\':=[{_,_}], \'filters\':=\#{atom()=>_}, \'params\':=\'nil\' | \#{binary()=>_}, \'prepare\':=[fun((_) -> any())], \'repo\':=atom(), \'repo_opts\':=[{_,_}], \'required\':=[atom()], \'types\':=\#{atom()=>atom() | {_,_}}, \'valid?\':=boolean(), \'validations\':=[{_,_}]}']}}
{:warn_matching, {'lib/contexts/v1/user_context.ex', 594}, {:pattern_match_cov, ['pattern <_changeset@1, _>', '<\#{\'__struct__\':=\'Elixir.Ecto.Changeset\', \'action\':=\'delete\' | \'ignore\' | \'insert\' | \'nil\' | \'replace\' | \'update\', \'changes\':=\#{atom()=>_}, \'constraints\':=[map()], \'data\':=\'nil\' | map(), \'empty_values\':=_, \'errors\':=[{_,_}], \'filters\':=\#{atom()=>_}, \'params\':=\'nil\' | \#{binary()=>_}, \'prepare\':=[fun((_) -> any())], \'repo\':=atom(), \'repo_opts\':=[{_,_}], \'required\':=[atom()], \'types\':=\#{atom()=>atom() | {_,_}}, \'valid?\':=\'true\', \'validations\':=[{_,_}]},_>']}}
{:warn_matching, {'lib/contexts/v1/user_context.ex', 598}, {:pattern_match_cov, ['pattern <_changeset@1, _>', '<\#{\'__struct__\':=\'Elixir.Ecto.Changeset\', \'action\':=\'delete\' | \'ignore\' | \'insert\' | \'nil\' | \'replace\' | \'update\', \'changes\':=\#{atom()=>_}, \'constraints\':=[map()], \'data\':=\'nil\' | map(), \'empty_values\':=_, \'errors\':=[{_,_}], \'filters\':=\#{atom()=>_}, \'params\':=\'nil\' | \#{binary()=>_}, \'prepare\':=[fun((_) -> any())], \'repo\':=atom(), \'repo_opts\':=[{_,_}], \'required\':=[atom()], \'types\':=\'nil\' | \#{atom()=>atom() | {_,_}}, \'valid?\':=\'true\', \'validations\':=[{_,_}]},_>']}}
{:warn_matching, {'lib/contexts/v1/user_context.ex', 1236}, {:exact_eq, ['\#{\'emails\':=_, \'first_name\':=_, \'last_name\':=_, \'suffix\':=_}', :==, '\'nil\'']}}
{:warn_matching, {'lib/contexts/v1/user_context.ex', 1243}, {:pattern_match_cov, ['variable _changeset@1', 'any()']}}
{:warn_matching, {'lib/contexts/v1/user_context.ex', 2338}, {:pattern_match_cov, ['pattern <_changeset@1, _>', '<\#{\'__struct__\':=\'Elixir.Ecto.Changeset\', \'action\':=\'delete\' | \'ignore\' | \'insert\' | \'nil\' | \'replace\' | \'update\', \'changes\':=\#{atom()=>_}, \'constraints\':=[map()], \'data\':=\'nil\' | map(), \'empty_values\':=_, \'errors\':=[{_,_}], \'filters\':=\#{atom()=>_}, \'params\':=\'nil\' | \#{binary()=>_}, \'prepare\':=[fun((_) -> any())], \'repo\':=atom(), \'repo_opts\':=[{_,_}], \'required\':=[atom()], \'types\':=\'nil\' | \#{atom()=>atom() | {_,_}}, \'valid?\':=\'true\', \'validations\':=[{_,_}]},_>']}}
{:warn_matching, {'lib/contexts/v1/user_context.ex', 2395}, {:pattern_match_cov, ['pattern <_changeset@1, _>', '<\#{\'__struct__\':=\'Elixir.Ecto.Changeset\', \'action\':=\'delete\' | \'ignore\' | \'insert\' | \'nil\' | \'replace\' | \'update\', \'changes\':=\#{atom()=>_}, \'constraints\':=[map()], \'data\':=\'nil\' | map(), \'empty_values\':=_, \'errors\':=[{_,_}], \'filters\':=\#{atom()=>_}, \'params\':=\'nil\' | \#{binary()=>_}, \'prepare\':=[fun((_) -> any())], \'repo\':=atom(), \'repo_opts\':=[{_,_}], \'required\':=[atom()], \'types\':=\'nil\' | \#{atom()=>atom() | {_,_}}, \'valid?\':=\'true\', \'validations\':=[{_,_}]},_>']}}
{:warn_matching, {'lib/contexts/v1/user_context.ex', 2422}, {:pattern_match_cov, ['pattern <_changeset@1, _>', '<\#{\'__struct__\':=\'Elixir.Ecto.Changeset\', \'action\':=\'delete\' | \'ignore\' | \'insert\' | \'nil\' | \'replace\' | \'update\', \'changes\':=\#{atom()=>_}, \'constraints\':=[map()], \'data\':=\'nil\' | map(), \'empty_values\':=_, \'errors\':=[{_,_}], \'filters\':=\#{atom()=>_}, \'params\':=\'nil\' | \#{binary()=>_}, \'prepare\':=[fun((_) -> any())], \'repo\':=atom(), \'repo_opts\':=[{_,_}], \'required\':=[atom()], \'types\':=\'nil\' | \#{atom()=>atom() | {_,_}}, \'valid?\':=\'true\', \'validations\':=[{_,_}]},_>']}}
Hi @jeremyjh, any update?
I have a similar error:
** (throw) {:error, :parsing, [{:"<<", 1}, {:<, 1}, {:_, 1}, {:":", 1}, {:int, 1, 8}, {:",", 1}, {:_, 1}, {:":", 1}, {:_, 1}, {:*, 1}, {:int, 1, 8}, {:">>", 1}, {:",", 1}, {:_, 1}, {:>, 1}]}
lib/erlex.ex:59: Erlex.parse/1
lib/erlex.ex:85: Erlex.pretty_print/1
lib/erlex.ex:172: Erlex.pretty_print_type/1
lib/dialyxir/warnings/pattern_match.ex:11: Dialyxir.Warnings.PatternMatch.format_short/1
lib/dialyxir/formatter.ex:117: Dialyxir.Formatter.format_warning/2
lib/dialyxir/formatter.ex:252: Dialyxir.Formatter.filter_warning/3
(elixir) lib/enum.ex:1440: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir) lib/enum.ex:1440: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
lib/dialyxir/formatter.ex:242: Dialyxir.Formatter.filter_warnings/3
lib/dialyxir/formatter.ex:28: Dialyxir.Formatter.format_and_filter/4
lib/dialyxir/dialyzer.ex:47: Dialyxir.Dialyzer.Runner.run/2
lib/dialyxir/dialyzer.ex:74: Dialyxir.Dialyzer.dialyze/3
lib/mix/tasks/dialyzer.ex:263: Mix.Tasks.Dialyzer.run_dialyzer/2
lib/mix/tasks/dialyzer.ex:195: Mix.Tasks.Dialyzer.run/1
(mix) lib/mix/task.ex:331: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2
It happened for me when I updated the hex dependencies ex_cldr_calendars
from version 1.1.0
to 1.3.0
and ex_cldr_dates_times
from version 2.1.0
to 2.2.2
.
I can also confirm, also using ex_cldr_dates_times
.
I'm getting this after upgrading Phoenix from 1.4.14 to 1.4.15:
** (throw) {:error, :parsing, [{:"<<", 1}, {:<, 1}, {:_, 1}, {:":", 1}, {:int, 1, 64}, {:",", 1}, {:_, 1}, {:":", 1}, {:_, 1}, {:*, 1}, {:int, 1, 8}, {:">>", 1}, {:",", 1}, {:atom_full, 1, '\'false\''}, {:>, 1}]}
lib/erlex.ex:59: Erlex.parse/1
lib/erlex.ex:85: Erlex.pretty_print/1
lib/erlex.ex:172: Erlex.pretty_print_type/1
lib/dialyxir/warnings/pattern_match.ex:11: Dialyxir.Warnings.PatternMatch.format_short/1
lib/dialyxir/formatter.ex:71: Dialyxir.Formatter.format_warning/2
lib/dialyxir/formatter.ex:209: Dialyxir.Formatter.filter_warning/3
(elixir 1.10.2) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.10.2) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
lib/dialyxir/formatter.ex:199: Dialyxir.Formatter.filter_warnings/3
lib/dialyxir/formatter.ex:22: Dialyxir.Formatter.format_and_filter/4
lib/dialyxir/dialyzer.ex:53: Dialyxir.Dialyzer.Runner.run/2
lib/dialyxir/dialyzer.ex:75: Dialyxir.Dialyzer.dialyze/3
lib/mix/tasks/dialyzer.ex:269: Mix.Tasks.Dialyzer.run_dialyzer/2
lib/mix/tasks/dialyzer.ex:201: Mix.Tasks.Dialyzer.run/1
(mix 1.10.2) lib/mix/task.ex:330: Mix.Task.run_task/3
(mix 1.10.2) lib/mix/cli.ex:82: Mix.CLI.run_task/2
I get the same output when I run mix dialyzer --format short
.
Elixir 1.10.2, OTP 22
I have the same error in two different builds:
I also started getting this right after upgrading phoenix from 1.4.14 to 1.4.15
The last 3 comments about Phoenix 1.4.15 are the same underlying but different bugs. They are fixed with Phoenix master and Dialyzer no longer crashes on that particular error in master. There is an open PR in Erlex to solve the underlying issue, though it has not been merged yet into master.
Actually just kidding it's the exact same underlying error. You all are so smart. The root cause is fixed in Erlex 0.2.6 and Dialyxir no longer chokes on bad Erlex parsing in Dialyxxir master. Closing, thanks all!
Dialyzer encountered error when parsing. Can anyone help me please.
Environment
Erlang/OTP 21
Elixir 1.8.1
Dialyzir 1.0.0-rc.6
Current behavior
mix dialyzer
Expected behavior