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)
@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
Eventautomatically. I believe the latest code should support allEventvariants now.Feel free to check it out and see how it works for you.
Also one note:
reqwesthas an issue (https://github.com/seanmonstar/reqwest/issues/26) that causes it to hang on MacOS at certain times, so I needed to override theslack-rs-apireqwestimpl (see here: https://github.com/slack-rs/slack-rs-api/blob/master/src/requests.rs#L15) to set aConnectionCloseheader 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://, onlyws:://, so that’s a non-starter. I consideredws-rs(also stuck on openssl0.7.x) but eventually picked tungstenite, it supports websocket over TLS and also has a tokio library. I’d really like to see non-blockingRTMClient.Since the the
slack-apihas now changed, we need to swap outrustc_serializeforserdewhich also increases the amount of changes. Specifically, theEventtransformations 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 eachEventvariant. 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
reqwestnow. 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_apicrate 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: