Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyper 0.14.27 deprecated/backports features don't produce any warnings, but can't upgrade to hyper 1.0 #3425

Closed
carols10cents opened this issue Nov 17, 2023 · 3 comments
Labels
C-bug Category: bug. Something is wrong. This is bad!

Comments

@carols10cents
Copy link

carols10cents commented Nov 17, 2023

Version

0.14.27 and 1.0+ :)

Platform

macOS arm64 (development) and linux 64 bit (server), I don't think this is relevant

Description

馃憢馃徎 Hi! I'm trying to help InfluxDB upgrade from hyper 0.14.27 to hyper 1.0.

A bunch of code uses hyper::Body from 0.14, which used to be a struct, and in hyper 1.0 it's a trait. So I know we're not compatible for that reason, and likely others as well.

I was hoping to get some guidance on how the code needs to be updated to enable upgrading to 1.0. I saw in the 1.0 release post the link to this hyper blog post from March 2023 that said hyper starting in version 0.14.25 would have the features deprecated and backports to help people prepare to upgrade. Great!

So I turned these features on everywhere that lists hyper as a dependency, ran cargo check --all-features --all-targets --workspace, and I'm not seeing any warnings as I expected to. Checking out this branch on my fork should allow for reproducing.

However, if I try changing all those hyper dependencies to 1.0, everything breaks 馃槀

Am I doing something wrong with the deprecated/backports features?

@carols10cents carols10cents added the C-bug Category: bug. Something is wrong. This is bad! label Nov 17, 2023
@seanmonstar
Copy link
Member

We added the warnings to things that people could upgrade while still using 0.14. Those warnings came out several months ago. We felt it would just be annoying to people if there were warnings on types that they couldn't fix yet. So, the change from Body being a type to a trait, or Client and Server being moved to a different crate. (See #3052).

I would like to put together a longer guide "how to upgrade from 0.14", mentioned in #3411.

@izderadicka
Copy link

Same problem here - just started looking at way to upgrade to 1.0. Used deprecated feature - no warnings, but upgrade to 1.0 breaks project completely. Looks like changes in 1.0 are massive, most visible is missing Body struct, but also others - make_service_fn, already mentioned Server, AddrIncomming, AddrStream to start with.

I was hoping that with deprecated I can gradually prepare for upgrade in 0.14, but it does not seem to work. Feeling bit desperate now, not knowing where to start - so the guide would be very much welcomed. Especially how to replace Body struct with something similar and universal (can serve bytes, stream of chunks ...) as Body is omnipresent in my program.

@seanmonstar
Copy link
Member

I've published that guide: https://hyper.rs/guides/1/upgrading/

It's certainly missing something I'm sure. If there's a question that it doesn't cover, we can fix it (file an issue).

For now, I'll close this as answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug. Something is wrong. This is bad!
Projects
None yet
Development

No branches or pull requests

3 participants