slack-rs: pinned hyper version dependency conflict with reqwest

The pinned hyper version is 0.9.x but hyper is now on 0.10.x.

Would it be easy to fix this up? I have a dependency conflict in my project.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

@blakehawkins great, thanks for the feedback. I still haven’t got around to testing it completely myself. I also want to try making slack non-blocking. I’ll probably send a PR in the next week or so.

Update: With some help from the serde experts, I was able to actually have serde generate all the deserialization code for Event automatically. I believe the latest code should support all Event variants now.

Feel free to check it out and see how it works for you.

Also one note: reqwest has an issue (https://github.com/seanmonstar/reqwest/issues/26) that causes it to hang on MacOS at certain times, so I needed to override the slack-rs-api reqwest impl (see here: https://github.com/slack-rs/slack-rs-api/blob/master/src/requests.rs#L15) to set a ConnectionClose header for testing locally.

The websocket crate also wants less than 0.10 so that won’t help

I spent some time working on this. There were a lot of changes required. First things first, the servo fork doesn’t actually work with wss://, only ws:://, so that’s a non-starter. I considered ws-rs (also stuck on openssl 0.7.x) but eventually picked tungstenite, it supports websocket over TLS and also has a tokio library. I’d really like to see non-blocking RTMClient.

Since the the slack-api has now changed, we need to swap out rustc_serialize for serde which also increases the amount of changes. Specifically, the Event transformations needed to be reworked. I’ve only implemented a few (you can check here: https://github.com/compressed/slack-rs/blob/tungstenite/src/events.rs#L278). It seems to be a bit of a pain (i.e. a lot of typing) to match each Event variant. Maybe there is a better way; I’m not an expert in serde. Or maybe we could use a macro to make it easier.

You can check out my work here: https://github.com/compressed/slack-rs/tree/tungstenite. I’m open to any help. It’s not really in PR form yet given the above… Also not really tested, examples not updated, etc.

@blakehawkins servo’s fork is updated to use openssl 0.9 and https://github.com/slack-rs/slack-rs-api is updated to use reqwest now. All that’s left now is the PR to update this crate.

Thanks for the update. I agree we should probably move everything to reqwest and the servo websocket fork. The codegen PR and a new release should be out soon I think.

On Mar 5, 2017 14:31, “compressed” notifications@github.com wrote:

It looks like servo has made their fork: https://github.com/servo/rust- websocket. There’s a PR there for updating hyper too.

Although I think we also need to have the underlying slack_api crate to move away from hyper too (which looks like is being done in the codegen PR).

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/slack-rs/slack-rs/issues/70#issuecomment-284253780, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4BqwUgWNt0s8TBqpofJjO-_Td9oj5tks5riw2bgaJpZM4MMziq .

It looks like servo has made their fork: https://github.com/servo/rust-websocket. There’s a PR there for updating hyper too.

Although I think we also need to have the underlying slack_api crate to move away from hyper too (which looks like is being done in the codegen PR).

If you all can afford to wait, I think the best option is probably to follow what servo does, if not perhaps we can look into migrating to another websocket library.

I’ll look into this tonight. Hopefully we should be able to resolve this shortly! Sorry for not responding sooner.

On Feb 27, 2017 13:43, “blakehawkins” notifications@github.com wrote:

Here’s an open issue for it - cyderize/rust-websocket#95 https://github.com/cyderize/rust-websocket/issues/95

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/slack-rs/slack-rs/issues/70#issuecomment-282810756, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4Bq5t1qJqMaj0rTJ_hdsIfHp4BbH7Cks5rgxlZgaJpZM4MMziq .