From a5580a939d2aa611449add3550eff64fa9a8586a Mon Sep 17 00:00:00 2001 From: nWacky Date: Tue, 12 Nov 2019 14:33:12 +0300 Subject: [PATCH] Update most crates to futures 0.3, add todos on not updated crates --- examples/warp_async/Cargo.toml | 2 +- integration_tests/async_await/Cargo.toml | 2 +- juniper/Cargo.toml | 4 ++-- juniper_benchmarks/Cargo.toml | 2 +- juniper_rocket/Cargo.toml | 2 +- juniper_rocket/src/lib.rs | 4 ++-- juniper_warp/Cargo.toml | 5 +++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/examples/warp_async/Cargo.toml b/examples/warp_async/Cargo.toml index 7568b799..169edb50 100644 --- a/examples/warp_async/Cargo.toml +++ b/examples/warp_async/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" log = "0.4.8" env_logger = "0.6.2" warp = "0.1.19" -futures-preview = { version = "0.3.0-alpha.19", features = ["async-await", "compat"] } +futures = { version = "0.3.1", features = ["compat"] } reqwest = "0.9.19" juniper_codegen = { git = "https://github.com/graphql-rust/juniper", branch = "async-await", features = ["async"] } diff --git a/integration_tests/async_await/Cargo.toml b/integration_tests/async_await/Cargo.toml index 2207cf04..a7712b56 100644 --- a/integration_tests/async_await/Cargo.toml +++ b/integration_tests/async_await/Cargo.toml @@ -8,5 +8,5 @@ edition = "2018" [dependencies] juniper = { path = "../../juniper", features = ["async"] } -futures-preview = "=0.3.0-alpha.19" +futures = "=0.3.1" tokio = "=0.2.0-alpha.6" diff --git a/juniper/Cargo.toml b/juniper/Cargo.toml index a0eb926a..9bec8887 100644 --- a/juniper/Cargo.toml +++ b/juniper/Cargo.toml @@ -24,7 +24,7 @@ harness = false path = "benches/bench.rs" [features] -async = ["juniper_codegen/async", "futures-preview"] +async = ["juniper_codegen/async", "futures"] expose-test-schema = [] default = [ "chrono", @@ -38,7 +38,7 @@ juniper_codegen = { version = "0.14.1", path = "../juniper_codegen" } async-trait = "0.1.16" chrono = { version = "0.4.0", optional = true } fnv = "1.0.3" -futures-preview = { version = "=0.3.0-alpha.19", optional = true } +futures = { version = "=0.3.1", optional = true } indexmap = { version = "1.0.0", features = ["serde-1"] } serde = { version = "1.0.8" } serde_derive = { version = "1.0.2" } diff --git a/juniper_benchmarks/Cargo.toml b/juniper_benchmarks/Cargo.toml index df10da20..431a98f5 100644 --- a/juniper_benchmarks/Cargo.toml +++ b/juniper_benchmarks/Cargo.toml @@ -12,7 +12,7 @@ harness = false [dependencies] juniper = { path = "../juniper", features = ["async"] } -futures-preview = "=0.3.0-alpha.19" +futures = "=0.3.1" [dev-dependencies] criterion = "0.2.11" diff --git a/juniper_rocket/Cargo.toml b/juniper_rocket/Cargo.toml index 8129904c..eba95bf7 100644 --- a/juniper_rocket/Cargo.toml +++ b/juniper_rocket/Cargo.toml @@ -20,7 +20,7 @@ serde_json = { version = "1.0.2" } serde_derive = { version = "1.0.2" } juniper = { version = "0.14.1", default-features = false, path = "../juniper"} -futures03 = { version = "=0.3.0-alpha.19", package = "futures-preview", features = ["compat"] } +futures = { version = "=0.3.1", features = ["compat"] } rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "async" } tokio = "=0.2.0-alpha.6" diff --git a/juniper_rocket/src/lib.rs b/juniper_rocket/src/lib.rs index dd57769a..0deff0e6 100644 --- a/juniper_rocket/src/lib.rs +++ b/juniper_rocket/src/lib.rs @@ -62,7 +62,7 @@ use juniper::{ use juniper::GraphQLTypeAsync; #[cfg(feature = "async")] -use futures03::future::{FutureExt, TryFutureExt}; +use futures::future::{FutureExt, TryFutureExt}; #[derive(Debug, serde_derive::Deserialize, PartialEq)] #[serde(untagged)] @@ -135,7 +135,7 @@ where .map(|request| request.execute_async(root_node, context)) .collect::>(); - GraphQLBatchResponse::Batch(futures03::future::join_all(futures).await) + GraphQLBatchResponse::Batch(futures::future::join_all(futures).await) } } } diff --git a/juniper_warp/Cargo.toml b/juniper_warp/Cargo.toml index a39392e3..102c4e9e 100644 --- a/juniper_warp/Cargo.toml +++ b/juniper_warp/Cargo.toml @@ -17,11 +17,12 @@ juniper = { version = "0.14.1", path = "../juniper", default-features = false } serde_json = "1.0.24" serde_derive = "1.0.75" failure = "0.1.2" -futures = "0.1.23" +# TODO: rebase juniper_warp to futures 3 once warp supports it +futures = "0.1.29" serde = "1.0.75" tokio-threadpool = "0.1.7" -futures03 = { version = "=0.3.0-alpha.19", optional = true, package = "futures-preview", features = ["compat"] } +futures03 = { version = "=0.3.1", optional = true, package = "futures", features = ["compat"] } [dev-dependencies] juniper = { version = "0.14.1", path = "../juniper", features = ["expose-test-schema", "serde_json"] }