Make the websocket Message easier to work with#903
Open
FSMaxB wants to merge 2 commits intoseanmonstar:masterfrom
Open
Make the websocket Message easier to work with#903FSMaxB wants to merge 2 commits intoseanmonstar:masterfrom
FSMaxB wants to merge 2 commits intoseanmonstar:masterfrom
Conversation
a9f7ee5 to
1ce802b
Compare
Contributor
Author
|
Rebased to fix formatting |
Collaborator
|
Hi, and thanks for your interest! There is already #821 on the pipeline |
Contributor
Author
|
Sorry for not doing due diligence and checking for existing pull requests. How should I proceed? Close this in favor of the existing pull request? I've noticed that there hasn't been any progress in the original pull request for several months. |
jxs
approved these changes
Sep 30, 2021
Collaborator
|
no worries! :) yeah I was just noticing that as well, and this one already addresses my review on the other and uses |
|
Sorry for bumping, but is there anything I could do to help get this merged? |
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.
Currently the
Messagetype is a bit hard to work with as can be seen here: https://github.com/communityvi/communityvi/blob/26bfbe16c8c4dc46545edeebf96d2b3aed8887ab/communityvi-server/src/utils/websocket_message_conversion.rs#L4-L33While looking at the code I also happened to notice the comment about
non-exhaustiveenum:warp/src/filters/ws.rs
Lines 267 to 274 in 9e74ff9
It would of course be best for usability/interoperability if warp used
tungstenite::protocol::Messagedirectly. I assume the opaqueMessagetype was introduced to allow for changes in the underlying implementation, without breaking warp's API?This pull request contains 2 commits:
Messageinto anon-exhaustiveenum without breaking the existing APIFromfortungstenite::protocol::Messagein both directions. This doesn't break the API, but it exposes the respective version of thetungstenite::protocol::Message, making any future update of thetungstenitedependency a potentially breaking change. If that is undesired, I can remove this second commit.