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

[Feature]: Support poem v2.0.0 #1519

Closed
1 task done
Mouwrice opened this issue Jan 14, 2024 · 1 comment · Fixed by #1520
Closed
1 task done

[Feature]: Support poem v2.0.0 #1519

Mouwrice opened this issue Jan 14, 2024 · 1 comment · Fixed by #1520
Labels
S-Accepted This will be worked on T-Feature Request A request for a new feature

Comments

@Mouwrice
Copy link
Contributor

Describe the feature

Poem has recently released version 2.0.0.
The poem changelog does not document a lot of changes but the diff between its previous version and the 2.0.0 release shows some internal changes that seemingly break the shuttle-poem service: 1.3.59…2.0.0

I am now on poem version 1.3.59 which works great with shuttle!
But now I am looking to upgrade to move to newer versions of poem, as other parts of poem also rely on this newer version, such as poem-openapi

To be exact, I list below the output of cargo check of the default shuttle-poem example, but using poem 2.0.0

error[E0277]: the trait bound `Route: poem::endpoint::endpoint::Endpoint` is not satisfied
  --> src/main.rs:15:12
   |
15 |     Ok(app.into())
   |            ^^^^ the trait `poem::endpoint::endpoint::Endpoint` is not implemented for `Route`
   |
   = help: the following other types implement trait `poem::endpoint::endpoint::Endpoint`:
             poem::endpoint::after::After<E, F>
             poem::endpoint::and_then::AndThen<E, F>
             poem::endpoint::around::Around<E, F>
             poem::endpoint::before::Before<E, F>
             poem::endpoint::catch_all_error::CatchAllError<E, F, R>
             poem::endpoint::catch_error::CatchError<E, F, R, ErrType>
             poem::endpoint::endpoint::EitherEndpoint<A, B>
             poem::endpoint::inspect_all_err::InspectAllError<E, F>
           and 21 others
   = note: required for `PoemService<Route>` to implement `From<Route>`
   = note: required for `Route` to implement `Into<PoemService<Route>>`

error[E0277]: the trait bound `impl Endpoint: poem::endpoint::endpoint::Endpoint` is not satisfied
  --> src/main.rs:11:1
   |
11 | #[shuttle_runtime::main]
   | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `poem::endpoint::endpoint::Endpoint` is not implemented for `impl Endpoint`
   |
   = help: the following other types implement trait `poem::endpoint::endpoint::Endpoint`:
             poem::endpoint::after::After<E, F>
             poem::endpoint::and_then::AndThen<E, F>
             poem::endpoint::around::Around<E, F>
             poem::endpoint::before::Before<E, F>
             poem::endpoint::catch_all_error::CatchAllError<E, F, R>
             poem::endpoint::catch_error::CatchError<E, F, R, ErrType>
             poem::endpoint::endpoint::EitherEndpoint<A, B>
             poem::endpoint::inspect_all_err::InspectAllError<E, F>
           and 21 others
   = note: required for `PoemService<impl Endpoint>` to implement `Service`
   = note: required for `fn(ProvisionerFactory, ResourceTracker) -> impl Future<Output = Result<PoemService<impl Endpoint>, shuttle_runtime::Error>> {loader}` to implement `shuttle_runtime::alpha::Loader<ProvisionerFactory>`
note: required by a bound in `start`
  --> /home/mouwrice/.cargo/registry/src/index.crates.io-6f17d22bba15001f/shuttle-runtime-0.36.0/src/alpha/mod.rs:49:33
   |
49 | pub async fn start(loader: impl Loader<ProvisionerFactory> + Send + 'static) {
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `start`
   = note: this error originates in the attribute macro `shuttle_runtime::main` (in Nightly builds, run with -Z macro-backtrace for more info)

P.S. Working with shuttle has been a breeze, I truly appreciate what Shuttle has to offer 🙏

Suggestion or Example of how the feature would be used

No response

Duplicate declaration

  • I have searched the issues and this feature has not been requested before.
@Mouwrice Mouwrice added S-Triage Awaiting decision for what to do T-Feature Request A request for a new feature labels Jan 14, 2024
@oddgrd
Copy link
Contributor

oddgrd commented Jan 15, 2024

Thanks for bringing this to our attention! I see that they upgraded to hyper 1.1, and how the server is started has changed, so we'll need to make some minor changes on the shuttle-poem side of things, but it shouldn't be a problem to upgrade for user's on the application side. We'll try to get this updated and released soon!

@oddgrd oddgrd added S-Accepted This will be worked on and removed S-Triage Awaiting decision for what to do labels Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Accepted This will be worked on T-Feature Request A request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants