-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish him. #566
Finish him. #566
Conversation
Refactor functions so Dialyzer can more easily determine the types originating from particular callers. Resolves: riak_repl_keylist_client.erl:331: The pattern 'cancel_fullsync' can never match the type 'pause_fullsync'
Ignore invalid specs to unset_env; they are valid with tuples and execute correctly, however, moving forward we should not use it because OTP has updated the spec to reflect only the specific calls they want to support moving forward.
Provide an actual return value to prevent the no local return error message. Resolves: riak_repl_console.erl:288: The created fun has no local return
At first glance these seem ok to me, but I'm not a repl domain expert. This leaves only these remaining errors:
|
Those will be addressed in a separate PR. |
end, | ||
log_stop(Command, State), | ||
wait_ack(cancel_fullsync, #state{sitename=SiteName} = State) -> | ||
NewState = application:unset_env(riak_repl, {progress, SiteName}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the correct value for NewState.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. This was resolved in 6bb6262.
I don't understand the reason for this ignore:
|
The rest of this looks fine. |
As best as I could tell via Typer, the unset_env and set_env calls which are producing errors because Dialyzer feels they will never succeed, causes it to identify that the |
You could move the log message before the (un)set_env calls, that should shut things up without doing anything other than logging a few instructions earlier. |
Reorder log messages to prevent the incorrectly specified set_env and unset_env calls from generating false errors.
Addressed logging issues with e30d78f. |
Resolves: riak_repl_console.erl:284: The created fun has no local return riak_repl_console.erl:285: The pattern {'ok', Members} can never match the type [{string(),non_neg_integer()}]
Regardless of the correct type specifications on sync_connect and sync_connect_status, dialyzer still believes that this function can never return 'ok' because the ranch call is thought to have failed because of the improper specification. See existing ignores related to ranch_tcp.
All callers of this function use encode_obj_msg, which never returns a non-binary, so crash if that is the case.
Depends on basho/riak_kv#882. |
+1 on this. |
Resolve the remaining dialyzer errors on repl. Flawless victory.