elli_ws_protocol#state.env now type list().#6
Open
pulltab wants to merge 1 commit intommzeeman:masterfrom
Open
elli_ws_protocol#state.env now type list().#6pulltab wants to merge 1 commit intommzeeman:masterfrom
pulltab wants to merge 1 commit intommzeeman:masterfrom
Conversation
|
Please consider merging this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
elli_ws_protocol#state.env was typed as an empty list, which resulted in dialyzer generating the following error when users tried passing in valid options to elli_websocket:upgrade/2:
The call elli_websocket:upgrade(Req::any(), WsArgs::[{'handler','***'} | {'handler_opts',[]} | {'resp_compress','false'},...]) will never return since it differs in the 2nd argument from the success typing arguments: (#req{method::'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'POST' | 'PUT' | 'TRACE' | 'undefined' | binary(),path::'undefined' | [binary()],args::'undefined' | [{binary(),_}],raw_path::'undefined' | binary(),version::'undefined' | {0 | 1,0 | 1 | 9},headers::'undefined' | [{binary(),binary() | [any()]}],body::'undefined' | binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []),pid::'undefined' | pid(),socket::'undefined' | {'plain',port()} | {'ssl',_},callback::'undefined' | {atom() | tuple(),_}}, [])To correct this, the type of elli_ws_protocol#state.env must be
list().