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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to axum ^0.7 #227

Open
lebenitza opened this issue Apr 22, 2024 · 4 comments
Open

Upgrade to axum ^0.7 #227

lebenitza opened this issue Apr 22, 2024 · 4 comments

Comments

@lebenitza
Copy link

Are there any plans to migrate to axum v0.7.x ?

https://github.com/tokio-rs/axum/releases/tag/axum-v0.7.0

This comes with other dependencies that need to be upgraded too, mentioned in the 0.7.0 release. I tried figuring this out but I am stuck at

error[E0119]: conflicting implementations of trait `FromRequest<_, axum_core::extract::private::ViaParts>` for type `event::Event`
  --> src/binding/axum/extract.rs:16:1
   |
16 | / impl<S, B> FromRequest<S, B> for Event
17 | | where
18 | |     B: Body + Send + 'static,
19 | |     B::Data: Send,
20 | |     B::Error: Into<BoxError>,
21 | |     S: Send + Sync,
   | |___________________^
   |
   = note: conflicting implementation in crate `axum_core`:
           - impl<S, T> FromRequest<S, axum_core::extract::private::ViaParts> for T
             where S: Send, S: Sync, T: FromRequestParts<S>;
   = note: downstream crates may implement trait `axum::extract::FromRequestParts<_>` for type `event::Event`
   = note: upstream crates may add a new impl of trait `http_body::Body` for type `axum_core::extract::private::ViaParts` in future versions

For more information about this error, try `rustc --explain E0119`.
error: could not compile `cloudevents-sdk` (lib) due to 1 previous error
@Lazzaretti
Copy link
Member

Hi @lebenitza ,
Sorry for the delay. I think it makes sense to update it. Would you like to contribute a PR? I'm happy to support you if you need help.

@ozabalaferrera
Copy link

I taking a quick look at what it would take to do this, and it seems that upgrading to http ^1.0 is unavoidable.
For example, I can't find a good way to create an http 1.1.0 response from an http 0.2.12 response to implement IntoResponse for Event.

Is that what you would expect, @Lazzaretti ?

@Lazzaretti
Copy link
Member

I think you are right, the http crate has to be updated. If this is the case, I'm fine with an upgrade.

@ozabalaferrera
Copy link

Sounds good. I have some travel scheduled, but I can take this up in a few weeks if no one else has by then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants