From 805933ee55e4931b479a4929a86a8610d8f4799c Mon Sep 17 00:00:00 2001 From: AtsukiTak Date: Fri, 23 Oct 2020 13:53:26 +0900 Subject: [PATCH 1/5] update postgres,tokio-postgres --- refinery_core/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refinery_core/Cargo.toml b/refinery_core/Cargo.toml index 6516d582..016c65e0 100644 --- a/refinery_core/Cargo.toml +++ b/refinery_core/Cargo.toml @@ -27,9 +27,9 @@ url = "2.0" walkdir = "2.3.1" rusqlite = {version = ">= 0.23, < 0.25", optional = true} -postgres = {version = "0.17", optional = true} +postgres = {version = "0.18", optional = true} mysql = {version = "18", optional = true} -tokio-postgres = { version = "0.5", optional = true } +tokio-postgres = { version = "0.6", optional = true } mysql_async = { version = "0.25", optional = true } tokio = { version = "0.2", features = ["full"], optional = true } From 381933ad1afb50dc0d38d94c5aed26593b416fce Mon Sep 17 00:00:00 2001 From: AtsukiTak Date: Fri, 23 Oct 2020 18:30:16 +0900 Subject: [PATCH 2/5] update tokio to 0.3.0 because tokio-postgres depends on it --- refinery_core/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refinery_core/Cargo.toml b/refinery_core/Cargo.toml index 016c65e0..717050a8 100644 --- a/refinery_core/Cargo.toml +++ b/refinery_core/Cargo.toml @@ -32,7 +32,7 @@ mysql = {version = "18", optional = true} tokio-postgres = { version = "0.6", optional = true } mysql_async = { version = "0.25", optional = true } -tokio = { version = "0.2", features = ["full"], optional = true } +tokio = { version = "0.3", features = ["full"], optional = true } [dev-dependencies] tempfile = "3.1.0" From fabe42aff133b46aa00047e2c26d01890d69b592 Mon Sep 17 00:00:00 2001 From: AtsukiTak Date: Fri, 23 Oct 2020 19:05:13 +0900 Subject: [PATCH 3/5] add tokio-compat-02 as dev-dependency --- refinery/Cargo.toml | 1 + refinery/tests/mysql_async.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/refinery/Cargo.toml b/refinery/Cargo.toml index f6ece80a..cfb3b579 100644 --- a/refinery/Cargo.toml +++ b/refinery/Cargo.toml @@ -26,6 +26,7 @@ refinery-core= { version = "0.4.0", path = "../refinery_core" } refinery-macros= { version = "0.4.0", path = "../refinery_macros" } [dev-dependencies] +tokio-compat-02 = "0.1" barrel = { version = "0.6", features = ["sqlite3", "pg", "mysql"] } futures = "0.3" assert_cmd = "0.12" diff --git a/refinery/tests/mysql_async.rs b/refinery/tests/mysql_async.rs index 9717414e..7494aaa9 100644 --- a/refinery/tests/mysql_async.rs +++ b/refinery/tests/mysql_async.rs @@ -14,6 +14,7 @@ mod mysql_async { use refinery_core::mysql_async::prelude::Queryable; use refinery_core::{mysql_async, tokio}; use std::panic::AssertUnwindSafe; + use tokio_compat_02::FutureExt as _; fn get_migrations() -> Vec { let migration1 = Migration::unapplied( @@ -65,8 +66,8 @@ mod mysql_async { } async fn run_test>(t: T) { - let result = AssertUnwindSafe(t).catch_unwind().await; - clean_database().await; + let result = AssertUnwindSafe(t).catch_unwind().compat().await; + clean_database().compat().await; assert!(result.is_ok()); } From 28d5d9c81e3f7229a91d913af81767365b7089ff Mon Sep 17 00:00:00 2001 From: AtsukiTak Date: Fri, 23 Oct 2020 19:21:29 +0900 Subject: [PATCH 4/5] directly fetch tokio-compat-02 crate from github --- refinery/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refinery/Cargo.toml b/refinery/Cargo.toml index cfb3b579..684080f1 100644 --- a/refinery/Cargo.toml +++ b/refinery/Cargo.toml @@ -26,7 +26,7 @@ refinery-core= { version = "0.4.0", path = "../refinery_core" } refinery-macros= { version = "0.4.0", path = "../refinery_macros" } [dev-dependencies] -tokio-compat-02 = "0.1" +tokio-compat-02 = { git = "https://github.com/LucioFranco/tokio-compat-02.git", branch = "main" } barrel = { version = "0.6", features = ["sqlite3", "pg", "mysql"] } futures = "0.3" assert_cmd = "0.12" From faba3c6d7545acc7cdbfaca5bba9e41e556fbcb5 Mon Sep 17 00:00:00 2001 From: AtsukiTak Date: Sun, 25 Oct 2020 14:31:43 +0900 Subject: [PATCH 5/5] use tokio-compat-02 --- refinery/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refinery/Cargo.toml b/refinery/Cargo.toml index 684080f1..aff94947 100644 --- a/refinery/Cargo.toml +++ b/refinery/Cargo.toml @@ -26,7 +26,7 @@ refinery-core= { version = "0.4.0", path = "../refinery_core" } refinery-macros= { version = "0.4.0", path = "../refinery_macros" } [dev-dependencies] -tokio-compat-02 = { git = "https://github.com/LucioFranco/tokio-compat-02.git", branch = "main" } +tokio-compat-02 = "~0.1.2" barrel = { version = "0.6", features = ["sqlite3", "pg", "mysql"] } futures = "0.3" assert_cmd = "0.12"