Fix codegen tests for latest nightly Rust

This commit is contained in:
tyranron 2022-08-29 17:10:40 +03:00
parent 0df1e448e8
commit e9482c3f18
No known key found for this signature in database
GPG key ID: 762E144FB230A4F0
14 changed files with 40 additions and 32 deletions

View file

@ -8,7 +8,7 @@ publish = false
[dependencies]
async-stream = "0.3"
env_logger = "0.9"
futures = "0.3.1"
futures = "0.3"
juniper = { path = "../../juniper" }
juniper_graphql_ws = { path = "../../juniper_graphql_ws" }
juniper_warp = { path = "../../juniper_warp", features = ["subscriptions"] }

View file

@ -43,7 +43,7 @@ bson = { version = "2.4", features = ["chrono-0_4"], optional = true }
chrono = { version = "0.4", features = ["alloc"], default-features = false, optional = true }
chrono-tz = { version = "0.6", default-features = false, optional = true }
fnv = "1.0.3"
futures = { version = "0.3.1", features = ["alloc"], default-features = false }
futures = { version = "0.3.22", features = ["alloc"], default-features = false }
futures-enum = { version = "0.1.12", default-features = false }
graphql-parser = { version = "0.4", optional = true }
indexmap = { version = "1.0", features = ["serde-1"] }

View file

@ -1,3 +1,5 @@
use std::future;
use crate::{
ast::Selection,
executor::{ExecutionResult, Executor},
@ -254,7 +256,7 @@ where
let is_non_null = meta_field.field_type.is_non_null();
let response_name = response_name.to_string();
async_values.push(AsyncValueFuture::Field(async move {
async_values.push_back(AsyncValueFuture::Field(async move {
// TODO: implement custom future type instead of
// two-level boxing.
let res = instance
@ -317,12 +319,12 @@ where
if let Ok(Value::Object(obj)) = sub_result {
for (k, v) in obj {
async_values.push(AsyncValueFuture::FragmentSpread(async move {
AsyncValue::Field(AsyncField {
async_values.push_back(AsyncValueFuture::FragmentSpread(
future::ready(AsyncValue::Field(AsyncField {
name: k,
value: Some(v),
})
}));
})),
));
}
} else if let Err(e) = sub_result {
sub_exec.push_error_at(e, *start_pos);
@ -362,19 +364,19 @@ where
if let Ok(Value::Object(obj)) = sub_result {
for (k, v) in obj {
async_values.push(AsyncValueFuture::InlineFragment1(async move {
AsyncValue::Field(AsyncField {
async_values.push_back(AsyncValueFuture::InlineFragment1(
future::ready(AsyncValue::Field(AsyncField {
name: k,
value: Some(v),
})
}));
})),
));
}
} else if let Err(e) = sub_result {
sub_exec.push_error_at(e, *start_pos);
}
}
} else {
async_values.push(AsyncValueFuture::InlineFragment2(async move {
async_values.push_back(AsyncValueFuture::InlineFragment2(async move {
let value = resolve_selection_set_into_async(
instance,
info,

View file

@ -27,7 +27,7 @@ actix-http = "3.0"
actix-web = "4.0"
actix-web-actors = "4.1.0"
anyhow = "1.0"
futures = "0.3"
futures = "0.3.22"
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
juniper_graphql_ws = { version = "0.4.0-dev", path = "../juniper_graphql_ws", optional = true }
http = "0.2.4"

View file

@ -30,6 +30,6 @@ url = "2.0"
[dev-dependencies]
derive_more = "0.99.7"
futures = "0.3"
futures = "0.3.22"
juniper = { path = "../juniper" }
serde = "1.0"

View file

@ -15,7 +15,7 @@ keywords = ["apollo", "graphql", "hyper", "juniper"]
exclude = ["/examples/", "/release.toml"]
[dependencies]
futures = "0.3.1"
futures = "0.3.22"
hyper = { version = "0.14", features = ["server", "runtime"] }
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
serde_json = "1.0"

View file

@ -18,7 +18,7 @@ keywords = ["apollo", "graphql", "iron", "juniper"]
exclude = ["/examples/", "/release.toml"]
[dependencies]
futures = "0.3.1"
futures = "0.3.22"
iron = ">= 0.5, < 0.7"
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
serde_json = "1.0.2"

View file

@ -18,7 +18,7 @@ keywords = ["apollo", "graphql", "juniper", "rocket"]
exclude = ["/examples/", "/tests/", "/release.toml"]
[dependencies]
futures = "0.3.1"
futures = "0.3.22"
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
rocket = { version = "=0.5.0-rc.2", default-features = false }
serde_json = "1.0.2"

View file

@ -15,7 +15,7 @@ keywords = ["graphql", "server", "subscription", "web", "websocket"]
exclude = ["/release.toml"]
[dependencies]
futures = "0.3.1"
futures = "0.3.22"
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
[dev-dependencies]

View file

@ -23,7 +23,7 @@ subscriptions = ["juniper_graphql_ws"]
[dependencies]
anyhow = "1.0"
futures = "0.3.1"
futures = "0.3.22"
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
juniper_graphql_ws = { version = "0.4.0-dev", path = "../juniper_graphql_ws", optional = true }
serde = { version = "1.0.75", features = ["derive"] }

View file

@ -8,7 +8,7 @@ publish = false
rustversion = "1.0"
[dev-dependencies]
futures = "0.3.1"
futures = "0.3"
juniper = { path = "../../juniper" }
serde_json = "1.0"
tokio = { version = "1.0", features = ["rt", "time", "macros"] }

View file

@ -1,7 +1,10 @@
error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
--> fail/interface/trait/argument_wrong_default_array.rs:3:1
--> fail/interface/trait/argument_wrong_default_array.rs:5:41
|
3 | #[graphql_interface]
| -------------------- required by a bound introduced by this call
4 | trait Character {
5 | fn wrong(&self, #[graphql(default = [true, false, false])] input: [bool; 2]) -> bool;
| ^^^^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`
|
= help: the following other types implement trait `From<T>`:
@ -14,5 +17,4 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
and 7 others
= note: required because of the requirements on the impl of `Into<[bool; 2]>` for `[bool; 3]`
= note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`

View file

@ -1,8 +1,11 @@
error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
--> fail/object/argument_wrong_default_array.rs:5:1
--> fail/object/argument_wrong_default_array.rs:7:41
|
5 | #[graphql_object]
| ^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`
| ----------------- required by a bound introduced by this call
6 | impl ObjA {
7 | fn wrong(&self, #[graphql(default = [true, false, false])] input: [bool; 2]) -> bool {
| ^^^^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`
|
= help: the following other types implement trait `From<T>`:
<&'a [ascii::ascii_char::AsciiChar] as From<&'a ascii::ascii_str::AsciiStr>>
@ -14,5 +17,4 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
and 7 others
= note: required because of the requirements on the impl of `Into<[bool; 2]>` for `[bool; 3]`
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`

View file

@ -1,8 +1,11 @@
error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
--> fail/subscription/argument_wrong_default_array.rs:10:1
--> fail/subscription/argument_wrong_default_array.rs:14:29
|
10 | #[graphql_subscription]
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`
| ----------------------- required by a bound introduced by this call
...
14 | #[graphql(default = [true, false, false])] input: [bool; 2],
| ^^^^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`
|
= help: the following other types implement trait `From<T>`:
<&'a [ascii::ascii_char::AsciiChar] as From<&'a ascii::ascii_str::AsciiStr>>
@ -14,5 +17,4 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
<[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>>
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
and 7 others
= note: required because of the requirements on the impl of `Into<[bool; 2]>` for `[bool; 3]`
= note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`