Fix codegen tests for latest nightly Rust
This commit is contained in:
parent
0df1e448e8
commit
e9482c3f18
14 changed files with 40 additions and 32 deletions
|
@ -8,7 +8,7 @@ publish = false
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-stream = "0.3"
|
async-stream = "0.3"
|
||||||
env_logger = "0.9"
|
env_logger = "0.9"
|
||||||
futures = "0.3.1"
|
futures = "0.3"
|
||||||
juniper = { path = "../../juniper" }
|
juniper = { path = "../../juniper" }
|
||||||
juniper_graphql_ws = { path = "../../juniper_graphql_ws" }
|
juniper_graphql_ws = { path = "../../juniper_graphql_ws" }
|
||||||
juniper_warp = { path = "../../juniper_warp", features = ["subscriptions"] }
|
juniper_warp = { path = "../../juniper_warp", features = ["subscriptions"] }
|
||||||
|
|
|
@ -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 = { version = "0.4", features = ["alloc"], default-features = false, optional = true }
|
||||||
chrono-tz = { version = "0.6", default-features = false, optional = true }
|
chrono-tz = { version = "0.6", default-features = false, optional = true }
|
||||||
fnv = "1.0.3"
|
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 }
|
futures-enum = { version = "0.1.12", default-features = false }
|
||||||
graphql-parser = { version = "0.4", optional = true }
|
graphql-parser = { version = "0.4", optional = true }
|
||||||
indexmap = { version = "1.0", features = ["serde-1"] }
|
indexmap = { version = "1.0", features = ["serde-1"] }
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
use std::future;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::Selection,
|
ast::Selection,
|
||||||
executor::{ExecutionResult, Executor},
|
executor::{ExecutionResult, Executor},
|
||||||
|
@ -254,7 +256,7 @@ where
|
||||||
let is_non_null = meta_field.field_type.is_non_null();
|
let is_non_null = meta_field.field_type.is_non_null();
|
||||||
|
|
||||||
let response_name = response_name.to_string();
|
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
|
// TODO: implement custom future type instead of
|
||||||
// two-level boxing.
|
// two-level boxing.
|
||||||
let res = instance
|
let res = instance
|
||||||
|
@ -317,12 +319,12 @@ where
|
||||||
|
|
||||||
if let Ok(Value::Object(obj)) = sub_result {
|
if let Ok(Value::Object(obj)) = sub_result {
|
||||||
for (k, v) in obj {
|
for (k, v) in obj {
|
||||||
async_values.push(AsyncValueFuture::FragmentSpread(async move {
|
async_values.push_back(AsyncValueFuture::FragmentSpread(
|
||||||
AsyncValue::Field(AsyncField {
|
future::ready(AsyncValue::Field(AsyncField {
|
||||||
name: k,
|
name: k,
|
||||||
value: Some(v),
|
value: Some(v),
|
||||||
})
|
})),
|
||||||
}));
|
));
|
||||||
}
|
}
|
||||||
} else if let Err(e) = sub_result {
|
} else if let Err(e) = sub_result {
|
||||||
sub_exec.push_error_at(e, *start_pos);
|
sub_exec.push_error_at(e, *start_pos);
|
||||||
|
@ -362,19 +364,19 @@ where
|
||||||
|
|
||||||
if let Ok(Value::Object(obj)) = sub_result {
|
if let Ok(Value::Object(obj)) = sub_result {
|
||||||
for (k, v) in obj {
|
for (k, v) in obj {
|
||||||
async_values.push(AsyncValueFuture::InlineFragment1(async move {
|
async_values.push_back(AsyncValueFuture::InlineFragment1(
|
||||||
AsyncValue::Field(AsyncField {
|
future::ready(AsyncValue::Field(AsyncField {
|
||||||
name: k,
|
name: k,
|
||||||
value: Some(v),
|
value: Some(v),
|
||||||
})
|
})),
|
||||||
}));
|
));
|
||||||
}
|
}
|
||||||
} else if let Err(e) = sub_result {
|
} else if let Err(e) = sub_result {
|
||||||
sub_exec.push_error_at(e, *start_pos);
|
sub_exec.push_error_at(e, *start_pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
async_values.push(AsyncValueFuture::InlineFragment2(async move {
|
async_values.push_back(AsyncValueFuture::InlineFragment2(async move {
|
||||||
let value = resolve_selection_set_into_async(
|
let value = resolve_selection_set_into_async(
|
||||||
instance,
|
instance,
|
||||||
info,
|
info,
|
||||||
|
|
|
@ -27,7 +27,7 @@ actix-http = "3.0"
|
||||||
actix-web = "4.0"
|
actix-web = "4.0"
|
||||||
actix-web-actors = "4.1.0"
|
actix-web-actors = "4.1.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
futures = "0.3"
|
futures = "0.3.22"
|
||||||
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
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 }
|
juniper_graphql_ws = { version = "0.4.0-dev", path = "../juniper_graphql_ws", optional = true }
|
||||||
http = "0.2.4"
|
http = "0.2.4"
|
||||||
|
|
|
@ -30,6 +30,6 @@ url = "2.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
derive_more = "0.99.7"
|
derive_more = "0.99.7"
|
||||||
futures = "0.3"
|
futures = "0.3.22"
|
||||||
juniper = { path = "../juniper" }
|
juniper = { path = "../juniper" }
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
|
|
|
@ -15,7 +15,7 @@ keywords = ["apollo", "graphql", "hyper", "juniper"]
|
||||||
exclude = ["/examples/", "/release.toml"]
|
exclude = ["/examples/", "/release.toml"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.3.1"
|
futures = "0.3.22"
|
||||||
hyper = { version = "0.14", features = ["server", "runtime"] }
|
hyper = { version = "0.14", features = ["server", "runtime"] }
|
||||||
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
|
@ -18,7 +18,7 @@ keywords = ["apollo", "graphql", "iron", "juniper"]
|
||||||
exclude = ["/examples/", "/release.toml"]
|
exclude = ["/examples/", "/release.toml"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.3.1"
|
futures = "0.3.22"
|
||||||
iron = ">= 0.5, < 0.7"
|
iron = ">= 0.5, < 0.7"
|
||||||
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
||||||
serde_json = "1.0.2"
|
serde_json = "1.0.2"
|
||||||
|
|
|
@ -18,7 +18,7 @@ keywords = ["apollo", "graphql", "juniper", "rocket"]
|
||||||
exclude = ["/examples/", "/tests/", "/release.toml"]
|
exclude = ["/examples/", "/tests/", "/release.toml"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.3.1"
|
futures = "0.3.22"
|
||||||
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
||||||
rocket = { version = "=0.5.0-rc.2", default-features = false }
|
rocket = { version = "=0.5.0-rc.2", default-features = false }
|
||||||
serde_json = "1.0.2"
|
serde_json = "1.0.2"
|
||||||
|
|
|
@ -15,7 +15,7 @@ keywords = ["graphql", "server", "subscription", "web", "websocket"]
|
||||||
exclude = ["/release.toml"]
|
exclude = ["/release.toml"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.3.1"
|
futures = "0.3.22"
|
||||||
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -23,7 +23,7 @@ subscriptions = ["juniper_graphql_ws"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
futures = "0.3.1"
|
futures = "0.3.22"
|
||||||
juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false }
|
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 }
|
juniper_graphql_ws = { version = "0.4.0-dev", path = "../juniper_graphql_ws", optional = true }
|
||||||
serde = { version = "1.0.75", features = ["derive"] }
|
serde = { version = "1.0.75", features = ["derive"] }
|
||||||
|
|
|
@ -8,7 +8,7 @@ publish = false
|
||||||
rustversion = "1.0"
|
rustversion = "1.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures = "0.3.1"
|
futures = "0.3"
|
||||||
juniper = { path = "../../juniper" }
|
juniper = { path = "../../juniper" }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tokio = { version = "1.0", features = ["rt", "time", "macros"] }
|
tokio = { version = "1.0", features = ["rt", "time", "macros"] }
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
|
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]
|
3 | #[graphql_interface]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`
|
| -------------------- 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>`:
|
= help: the following other types implement trait `From<T>`:
|
||||||
<&'a [ascii::ascii_char::AsciiChar] as From<&'a ascii::ascii_str::AsciiStr>>
|
<&'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; 1] as From<ppv_lite86::x86_64::vec128_storage>>
|
||||||
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
|
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
|
||||||
and 7 others
|
and 7 others
|
||||||
= note: required because of the requirements on the impl of `Into<[bool; 2]>` for `[bool; 3]`
|
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
|
||||||
= note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
|
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]
|
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>`:
|
= help: the following other types implement trait `From<T>`:
|
||||||
<&'a [ascii::ascii_char::AsciiChar] as From<&'a ascii::ascii_str::AsciiStr>>
|
<&'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; 1] as From<ppv_lite86::x86_64::vec128_storage>>
|
||||||
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
|
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
|
||||||
and 7 others
|
and 7 others
|
||||||
= note: required because of the requirements on the impl of `Into<[bool; 2]>` for `[bool; 3]`
|
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
|
||||||
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
|
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]
|
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>`:
|
= help: the following other types implement trait `From<T>`:
|
||||||
<&'a [ascii::ascii_char::AsciiChar] as From<&'a ascii::ascii_str::AsciiStr>>
|
<&'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; 1] as From<ppv_lite86::x86_64::vec128_storage>>
|
||||||
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
|
<[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>>
|
||||||
and 7 others
|
and 7 others
|
||||||
= note: required because of the requirements on the impl of `Into<[bool; 2]>` for `[bool; 3]`
|
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
|
||||||
= note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
||||||
|
|
Loading…
Reference in a new issue