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

Rename read/write to send/receive #1603

Merged
merged 6 commits into from Dec 19, 2017

Conversation

Projects
None yet
6 participants
@rsoeldner
Contributor

rsoeldner commented Dec 18, 2017

.. as discussed #1596

@aeons

aeons approved these changes Dec 18, 2017

@aeons

We should probably have deprecated aliases for the old names.

@@ -40,13 +40,13 @@ package object websocket {
* @param status The status code to return to a client making a non-websocket HTTP request to this route
*/
def WS[F[_]](
read: Stream[F, WebSocketFrame],
write: Sink[F, WebSocketFrame],
send: Stream[F, WebSocketFrame],

This comment has been minimized.

@rsoeldner

rsoeldner Dec 18, 2017

Contributor

@aeons I'm unsure how to handle the deprecation here

@rsoeldner

rsoeldner Dec 18, 2017

Contributor

@aeons I'm unsure how to handle the deprecation here

This comment has been minimized.

@rossabaker

rossabaker Dec 18, 2017

Member

I don't think we can in this case. It'll break for people using named arguments, but at least the types are unique. I think it'll be okay.

@rossabaker

rossabaker Dec 18, 2017

Member

I don't think we can in this case. It'll break for people using named arguments, but at least the types are unique. I think it'll be okay.

This comment has been minimized.

@jmcardon

jmcardon Dec 19, 2017

Member

👍 to this as well. It should be a simple fix for users.

@jmcardon

jmcardon Dec 19, 2017

Member

👍 to this as well. It should be a simple fix for users.

@cquiroz

This comment has been minimized.

Show comment
Hide comment
@cquiroz

cquiroz Dec 18, 2017

Member

Looks good. I guess existing users will get a compilation error right away forcing them to change the code and it's a simple rename in this case

Member

cquiroz commented Dec 18, 2017

Looks good. I guess existing users will get a compilation error right away forcing them to change the code and it's a simple rename in this case

read: Stream[F, WebSocketFrame],
write: Sink[F, WebSocketFrame]
)
@deprecatedName('read) send: Stream[F, WebSocketFrame],

This comment has been minimized.

@ChristopherDavenport

ChristopherDavenport Dec 18, 2017

Member

Can the deprecation be versioned here?

@ChristopherDavenport

ChristopherDavenport Dec 18, 2017

Member

Can the deprecation be versioned here?

@@ -40,13 +40,13 @@ package object websocket {
* @param status The status code to return to a client making a non-websocket HTTP request to this route
*/
def WS[F[_]](
read: Stream[F, WebSocketFrame],
write: Sink[F, WebSocketFrame],
send: Stream[F, WebSocketFrame],

This comment has been minimized.

@rossabaker

rossabaker Dec 18, 2017

Member

I don't think we can in this case. It'll break for people using named arguments, but at least the types are unique. I think it'll be okay.

@rossabaker

rossabaker Dec 18, 2017

Member

I don't think we can in this case. It'll break for people using named arguments, but at least the types are unique. I think it'll be okay.

Show outdated Hide outdated core/src/main/scala/org/http4s/websocket/Websocket.scala Outdated
@rossabaker

And after all that, @deprecatedName only takes one argument in Scala 2.11. Sorry about that. 😞

@jmcardon

I think the receive description and the travis failure should be changed, but otherwise everything seems fine. Fix that and it's a green from me 👍

Show outdated Hide outdated server/src/main/scala/org/http4s/server/websocket/package.scala Outdated
@@ -40,13 +40,13 @@ package object websocket {
* @param status The status code to return to a client making a non-websocket HTTP request to this route
*/
def WS[F[_]](
read: Stream[F, WebSocketFrame],
write: Sink[F, WebSocketFrame],
send: Stream[F, WebSocketFrame],

This comment has been minimized.

@jmcardon

jmcardon Dec 19, 2017

Member

👍 to this as well. It should be a simple fix for users.

@jmcardon

jmcardon Dec 19, 2017

Member

👍 to this as well. It should be a simple fix for users.

rsoeldner added some commits Dec 19, 2017

@rsoeldner

This comment has been minimized.

Show comment
Hide comment
@rsoeldner

rsoeldner Dec 19, 2017

Contributor

@rossabaker next try 🎉

Contributor

rsoeldner commented Dec 19, 2017

@rossabaker next try 🎉

@aeons

aeons approved these changes Dec 19, 2017

@rossabaker rossabaker merged commit 10e1293 into http4s:master Dec 19, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment