-
Hi, 👋. After upgrading these dependencies.
I get the following errors: cargo doc --all-features --no-deps
Checking async-graphql-axum v7.0.0
error: future cannot be sent between threads safely
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-graphql-axum-7.0.0/src/extract.rs:101:86
|
101 | async fn from_request(req: Request, _state: &S) -> Result<Self, Self::Rejection> {
| ______________________________________________________________________________________^
102 | | if let (&Method::GET, uri) = (req.method(), req.uri()) {
103 | | let res = async_graphql::http::parse_query_string(uri.query().unwrap_or_default())
104 | | .map_err(|err| {
... |
131 | | }
132 | | }
| |_____^ future created by async block is not `Send`
|
= help: the trait `Sync` is not implemented for `(dyn HttpBody<Data = bytes::Bytes, Error = axum::Error> + std::marker::Send + 'static)`
note: future is not `Send` as this value is used across an await
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-graphql-axum-7.0.0/src/extract.rs:128:18
|
102 | if let (&Method::GET, uri) = (req.method(), req.uri()) {
| --- has type `&axum::http::Request<Body>` which is not `Send`
...
128 | .await?,
| ^^^^^ await occurs here, with `req` maybe used later
...
132 | }
| - `req` is later dropped here
help: consider moving this into a `let` binding to create a shorter lived borrow
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-graphql-axum-7.0.0/src/extract.rs:102:39
|
102 | if let (&Method::GET, uri) = (req.method(), req.uri()) {
| ^^^^^^^^^^^^
= note: required for the cast from `Pin<Box<...>>` to `Pin<Box<dyn Future<Output = Result<GraphQLBatchRequest<R>, R>> + Send>>`
= note: the full name for the source type has been written to '/home/user/projects/template/tin/target/debug/deps/async_graphql_axum-982f19d26db5fd50.long-type-11748169569985021695.txt'
= note: the full name for the target type has been written to '/home/user/projects/template/tin/target/debug/deps/async_graphql_axum-982f19d26db5fd50.long-type-4719900429319514242.txt'
error: could not compile `async-graphql-axum` (lib) due to previous error
error: Recipe `_doc-check` failed on line 96 with exit code 101 I assume this error is related to my codebase because I can't reproduce it with a Minimal Working Example (MWE) using the mentioned dependencies. However, I have no clue to pinpoint the issue, and I can't decipher the error message. This is my code: https://github.com/azzamsa/tin [dependencies]
-axum = "0.6.20"
-hyper = "0.14.28"
+axum = "0.7.3"
+hyper = "1.1.0"
tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread"] }
# GraphQL
-async-graphql = { version = "6.0.11", features = ["uuid", "chrono"] }
-async-graphql-axum = "6.0.11"
+async-graphql = { version = "7.0.0", features = ["uuid", "chrono"] }
+async-graphql-axum = "7.0.0"
# Rest
utoipa = { version = "4.1.0", features = ["axum_extras"] }
-utoipa-swagger-ui = { version = "4.0.0", features = ["axum"] }
+utoipa-swagger-ui = { version = "5.0.0", features = ["axum"] } The error points to: Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I just did a quick test , got the same issue on stable, but on nightly it seems everything compile: azzamsa/tin#4 |
Beta Was this translation helpful? Give feedback.
-
Yes, it is. |
Beta Was this translation helpful? Give feedback.
I just did a quick test , got the same issue on stable, but on nightly it seems everything compile: azzamsa/tin#4