Skip to content

Unable to install trunk from cargo #1029

@Mforcen

Description

@Mforcen

Hi there,
It seems that a dependency was changed during those days, since now cargo install fails to compile trunk. Please check out the log:

error[E0277]: the trait bound `<<A as Accept<TcpStream, ...>>::Service as SendService<...>>::BodyData: Buf` is not satisfied
   --> /workspace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/axum-server-0.7.2/src/server.rs:202:87
    |
202 |                         let serve_future = builder.serve_connection_with_upgrades(io, service);
    |                                                    ------------------------------     ^^^^^^^ the trait `Buf` is not implemented for `<<A as Accept<TcpStream, <M as MakeService<..., ...>>::Service>>::Service as SendService<...>>::BodyData`
    |                                                    |
    |                                                    required by a bound introduced by this call
    |
    = note: required for `UpgradedSendStreamTask<<<A as Accept<TcpStream, ...>>::Service as SendService<...>>::BodyData>` to implement `Future`
    = note: required for `TokioExecutor` to implement `Executor<hyper::proto::h2::upgrade::UpgradedSendStreamTask<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::BodyData>>`
    = note: required for `TokioExecutor` to implement `bounds::h2_common::Http2UpgradedExec<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::BodyData>`
    = note: required for `TokioExecutor` to implement `Http2ServerConnExec<TowerToHyperServiceFuture<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Service, http::Request<hyper::body::Incoming>>, <<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Body>`
    = note: required for `TokioExecutor` to implement `HttpServerConnExec<TowerToHyperServiceFuture<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Service, http::Request<hyper::body::Incoming>>, <<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Body>`
note: required by a bound in `hyper_util::server::conn::auto::Builder::<E>::serve_connection_with_upgrades`
   --> /workspace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hyper-util-0.1.17/src/server/conn/auto/mod.rs:269:12
    |
257 |     pub fn serve_connection_with_upgrades<I, S, B>(
    |            ------------------------------ required by a bound in this associated function
...
269 |         E: HttpServerConnExec<S::Future, B>,
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Builder::<E>::serve_connection_with_upgrades`
    = note: the full name for the type has been written to '/tmp/cargo-installKIw3Q5/release/deps/axum_server-8c847a5f8952bb4e.long-type-5047444886732152739.txt'
    = note: consider using `--verbose` to print the full type name to the console
help: consider further restricting the associated type
    |
159 |         A::Future: Send, <<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::BodyData: Buf
    |                          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<<A as Accept<TcpStream, ...>>::Service as SendService<...>>::BodyData: Buf` is not satisfied
   --> /workspace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/axum-server-0.7.2/src/server.rs:205:25
    |
205 | /                         tokio::select! {
206 | |                             biased;
207 | |                             _ = watcher.wait_graceful_shutdown() => {
208 | |                                 serve_future.as_mut().graceful_shutdown();
...   |
216 | |                             _ = &mut serve_future => (),
217 | |                         }
    | |                         ^
    | |                         |
    | |_________________________the trait `Buf` is not implemented for `<<A as Accept<TcpStream, <M as MakeService<..., ...>>::Service>>::Service as SendService<...>>::BodyData`
    |                           required by a bound introduced by this call
    |
    = note: required for `UpgradedSendStreamTask<<<A as Accept<TcpStream, ...>>::Service as SendService<...>>::BodyData>` to implement `Future`
    = note: required for `TokioExecutor` to implement `Executor<hyper::proto::h2::upgrade::UpgradedSendStreamTask<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::BodyData>>`
    = note: required for `TokioExecutor` to implement `bounds::h2_common::Http2UpgradedExec<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::BodyData>`
    = note: required for `TokioExecutor` to implement `Http2ServerConnExec<TowerToHyperServiceFuture<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Service, http::Request<hyper::body::Incoming>>, <<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Body>`
    = note: required for `TokioExecutor` to implement `HttpServerConnExec<TowerToHyperServiceFuture<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Service, http::Request<hyper::body::Incoming>>, <<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Body>`
    = note: 3 redundant requirements hidden
    = note: required for `&mut Pin<&mut UpgradeableConnection<'_, TokioIo<<A as Accept<TcpStream, ...>>::Stream>, ..., ...>>` to implement `Future`
    = note: required for `&mut Pin<&mut UpgradeableConnection<'_, TokioIo<<A as Accept<TcpStream, ...>>::Stream>, ..., ...>>` to implement `IntoFuture`
    = note: the full name for the type has been written to '/tmp/cargo-installKIw3Q5/release/deps/axum_server-8c847a5f8952bb4e.long-type-5047444886732152739.txt'
    = note: consider using `--verbose` to print the full type name to the console
    = note: this error originates in the macro `$crate::select` which comes from the expansion of the macro `tokio::select` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider further restricting the associated type
    |
159 |         A::Future: Send, <<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::BodyData: Buf
    |                          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0599]: the method `graceful_shutdown` exists for struct `Pin<&mut UpgradeableConnection<'_, TokioIo<<A as Accept<TcpStream, ...>>::Stream>, ..., ...>>`, but its trait bounds were not satisfied
   --> /workspace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/axum-server-0.7.2/src/server.rs:208:55
    |
208 | ...                   serve_future.as_mut().graceful_shutdown();
    |                                             ^^^^^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
   ::: /workspace/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hyper-util-0.1.17/src/rt/tokio.rs:75:1
    |
75  | pub struct TokioExecutor {}
    | ------------------------ doesn't satisfy `_: HttpServerConnExec<TowerToHyperServiceFuture<<<A as Accept<TcpStream, <M as MakeService<SocketAddr, Request<Incoming>>>::Service>>::Service as SendService<Request<Incoming>>>::Service, Request<Incoming>>, <<A as Accept<TcpStream, <M as MakeService<SocketAddr, Request<Incoming>>>::Service>>::Service as SendService<Request<Incoming>>>::Body>`
    |
    = note: the following trait bounds were not satisfied:
            `<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::BodyData: Buf`
            which is required by `TokioExecutor: HttpServerConnExec<TowerToHyperServiceFuture<<<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Service, http::Request<hyper::body::Incoming>>, <<A as accept::Accept<tokio::net::TcpStream, <M as MakeService<std::net::SocketAddr, http::Request<hyper::body::Incoming>>>::Service>>::Service as SendService<http::Request<hyper::body::Incoming>>>::Body>`

If needed, I can take a look on this.

Best regards,
Manuel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions