From 263d7b4e164af704b5d77d3e89b4c43c78b6c4a0 Mon Sep 17 00:00:00 2001 From: Stanimal Date: Fri, 11 Oct 2019 13:13:00 +0200 Subject: [PATCH] Updated futures-rs, tokio, tower and rust - rust nightly-2019-10-04 (Requires new docker image build) - futures alpha.19 - tokio alpha.6 - tower alpha2 Came across this panic in the rust compiler in a PR to follow: https://github.com/rust-lang/rust/issues/64385 --- .circleci/config.yml | 4 ++-- applications/console_text_messenger/Cargo.toml | 4 ++-- base_layer/core/Cargo.toml | 6 +++--- base_layer/p2p/Cargo.toml | 8 ++++---- base_layer/service_framework/Cargo.toml | 6 +++--- base_layer/wallet/Cargo.toml | 6 +++--- comms/Cargo.toml | 4 ++-- comms/dht/Cargo.toml | 8 ++++---- comms/middleware/Cargo.toml | 6 +++--- infrastructure/broadcast_channel/Cargo.toml | 5 ++--- infrastructure/pubsub/Cargo.toml | 2 +- infrastructure/pubsub/src/lib.rs | 7 +------ rust-toolchain | 2 +- 13 files changed, 31 insertions(+), 37 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a9f4e9068..e492756334 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 defaults: - rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2019-09-13 + rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2019-10-04 jobs: test-docs: @@ -70,7 +70,7 @@ jobs: - run: name: Tari source code command: | - TOOLCHAIN_VERSION=nightly-2019-09-13 + TOOLCHAIN_VERSION=nightly-2019-10-04 rustup component add --toolchain $TOOLCHAIN_VERSION rustfmt cargo fmt --all -- --check cargo test --all diff --git a/applications/console_text_messenger/Cargo.toml b/applications/console_text_messenger/Cargo.toml index b1e2f8fc14..90b04fa3ed 100644 --- a/applications/console_text_messenger/Cargo.toml +++ b/applications/console_text_messenger/Cargo.toml @@ -19,11 +19,11 @@ clap = "2.33.0" config = { version = "0.9.3" } crossbeam-channel = "0.3.8" ctrlc = "3.1.3" -futures = { version = "=0.3.0-alpha.18", package = "futures-preview", features =["compat", "std"]} +futures = { version = "=0.3.0-alpha.19", package = "futures-preview", features =["compat", "std"]} log = { version = "0.4.0", features = ["std"] } log4rs = {version ="0.8.3",features = ["console_appender", "file_appender", "file", "yaml_format"]} pnet = "0.22.0" serde = "1.0.90" serde_derive = "1.0.90" simple_logger = "1.2.0" -tokio = "0.2.0-alpha.4" \ No newline at end of file +tokio = "0.2.0-alpha.6" \ No newline at end of file diff --git a/base_layer/core/Cargo.toml b/base_layer/core/Cargo.toml index 3d6bb4d99d..07d8333581 100644 --- a/base_layer/core/Cargo.toml +++ b/base_layer/core/Cargo.toml @@ -33,9 +33,9 @@ blake2 = "^0.8.0" bigint = "^4.4.1" ttl_cache = "0.5.1" croaring = "^0.4.0" -tokio = { version="^0.2.0-alpha.4" } -tokio-executor = { version ="^0.2.0-alpha.4", features = ["threadpool"] } -futures-preview = {version = "0.3.0-alpha.18", features = ["nightly", "async-await"] } +tokio = { version="^0.2.0-alpha.6" } +tokio-executor = { version ="^0.2.0-alpha.6", features = ["threadpool"] } +futures-preview = {version = "0.3.0-alpha.19", features = ["async-await"] } lmdb-zero = "0.4.4" [dev-dependencies] diff --git a/base_layer/p2p/Cargo.toml b/base_layer/p2p/Cargo.toml index 80fc4c000e..f72b55a34e 100644 --- a/base_layer/p2p/Cargo.toml +++ b/base_layer/p2p/Cargo.toml @@ -21,7 +21,7 @@ tari_broadcast_channel = { version="^0.0", path = "../../infrastructure/broadca chrono = { version = "0.4.6", features = ["serde"]} crossbeam-channel = "0.3.8" derive-error = "0.0.4" -futures = { version = "=0.3.0-alpha.18", package = "futures-preview"} +futures = { version = "=0.3.0-alpha.19", package = "futures-preview"} lmdb-zero = "0.4.4" log = "0.4.6" rand = "0.6.5" @@ -29,11 +29,11 @@ rmp-serde = "0.13.7" serde = "1.0.90" serde_derive = "1.0.90" threadpool = "1.7.1" -tokio = "0.2.0-alpha.4" -tower-service = { version="0.3.0-alpha.1" } +tokio = "0.2.0-alpha.6" +tower-service = { version="0.3.0-alpha.2" } tracing = "0.1.5" ttl_cache = "0.5.1" -tower = "0.3.0-alpha.1a" +tower = "0.3.0-alpha.2" [dev-dependencies] tari_test_utils = { version = "^0.0", path="../../infrastructure/test_utils" } diff --git a/base_layer/service_framework/Cargo.toml b/base_layer/service_framework/Cargo.toml index 51c3e58ea1..d99f66d0ee 100644 --- a/base_layer/service_framework/Cargo.toml +++ b/base_layer/service_framework/Cargo.toml @@ -10,9 +10,9 @@ edition = "2018" [dependencies] derive-error = "0.0.4" -futures = { version = "=0.3.0-alpha.18", package = "futures-preview", features=["async-await", "nightly"]} -tower-service = { version="0.3.0-alpha.1" } -tokio = "0.2.0-alpha.4" +futures = { version = "=0.3.0-alpha.19", package = "futures-preview", features=["async-await"]} +tower-service = { version="0.3.0-alpha.2" } +tokio = "0.2.0-alpha.6" [dev-dependencies] tari_test_utils = { version = "^0.0", path="../../infrastructure/test_utils" } diff --git a/base_layer/wallet/Cargo.toml b/base_layer/wallet/Cargo.toml index d8eebde338..59e95b34a7 100644 --- a/base_layer/wallet/Cargo.toml +++ b/base_layer/wallet/Cargo.toml @@ -27,10 +27,10 @@ lmdb-zero = "0.4.4" #diesel_migrations = "1.4" #diesel = {version="1.4", features = ["sqlite", "serde_json", "chrono", "r2d2"]} rand = "0.5.5" -futures = { version = "=0.3.0-alpha.18", package = "futures-preview", features =["compat", "std"]} +futures = { version = "=0.3.0-alpha.19", package = "futures-preview", features =["compat", "std"]} tokio = "0.2.0-alpha.4" -tower = "0.3.0-alpha.1a" -tokio-executor = { version ="^0.2.0-alpha.4", features = ["threadpool"] } +tower = "0.3.0-alpha.2" +tokio-executor = { version ="^0.2.0-alpha.6", features = ["threadpool"] } [dev-dependencies] env_logger = "0.6.2" diff --git a/comms/Cargo.toml b/comms/Cargo.toml index 4b5858c169..cbeb38f830 100644 --- a/comms/Cargo.toml +++ b/comms/Cargo.toml @@ -18,7 +18,7 @@ chrono = { version = "0.4.6", features = ["serde"] } clear_on_drop = "0.2.3" derive-error = "0.0.4" digest = "0.8.0" -futures = { version = "=0.3.0-alpha.18", package = "futures-preview", features =["compat", "async-await", "nightly"]} +futures = { version = "=0.3.0-alpha.19", package = "futures-preview", features =[ "async-await"]} lazy_static = "1.3.0" lmdb-zero = "0.4.4" log = { version = "0.4.0", features = ["std"] } @@ -26,7 +26,7 @@ rand = "0.5.5" serde = "1.0.90" serde_derive = "1.0.90" time = "0.1.42" -tokio = "0.2.0-alpha.4" +tokio = "0.2.0-alpha.6" ttl_cache = "0.5.1" zmq = "0.9.1" serde_repr = "0.1.5" diff --git a/comms/dht/Cargo.toml b/comms/dht/Cargo.toml index ca8b66e909..fda410d121 100644 --- a/comms/dht/Cargo.toml +++ b/comms/dht/Cargo.toml @@ -21,15 +21,15 @@ bitflags = "1.2.0" chrono = "0.4.9" derive-error = "0.0.4" digest = "0.8.1" -futures= {version= "0.3.0-alpha.18", package="futures-preview"} +futures= {version= "0.3.0-alpha.19", package="futures-preview"} log = "0.4.8" rand = "0.5.5" serde = "1.0.90" serde_derive = "1.0.90" serde_repr = "0.1.5" -tokio = "0.2.0-alpha.4" -tokio-executor = "0.2.0-alpha.4" -tower= "0.3.0-alpha.1a" +tokio = "0.2.0-alpha.6" +tokio-executor = "0.2.0-alpha.6" +tower= "0.3.0-alpha.2" ttl_cache = "0.5.1" [dev-dependencies] diff --git a/comms/middleware/Cargo.toml b/comms/middleware/Cargo.toml index 1fbabf34d3..08f299ece5 100644 --- a/comms/middleware/Cargo.toml +++ b/comms/middleware/Cargo.toml @@ -18,12 +18,12 @@ tari_pubsub = { version="^0.0", path="../../infrastructure/pubsub"} tari_utilities = { version = "^0.0", path = "../../infrastructure/tari_util"} derive-error = "0.0.4" -futures= {version= "0.3.0-alpha.18", package="futures-preview"} +futures= {version= "0.3.0-alpha.19", package="futures-preview"} log = "0.4.8" serde = "1.0.90" serde_derive = "1.0.90" -tokio = "0.2.0-alpha.4" -tower= "0.3.0-alpha.1a" +tokio = "0.2.0-alpha.6" +tower= "0.3.0-alpha.2" rand = "0.5.5" [dev-dependencies] diff --git a/infrastructure/broadcast_channel/Cargo.toml b/infrastructure/broadcast_channel/Cargo.toml index 93d2e9c7d4..c05c3a13d7 100644 --- a/infrastructure/broadcast_channel/Cargo.toml +++ b/infrastructure/broadcast_channel/Cargo.toml @@ -12,13 +12,12 @@ edition = "2018" [dependencies] arc-swap = "0.4.2" -futures = { version = "=0.3.0-alpha.18", package = "futures-preview" } +futures = { version = "=0.3.0-alpha.19", package = "futures-preview" } crossbeam-channel = "0.3.9" [dev-dependencies] criterion = "0.3.0" -tokio = "0.2.0-alpha.4" -futures = { version = "=0.3.0-alpha.18", package = "futures-preview"} +tokio = "0.2.0-alpha.6" [[example]] name = "raw-simple" diff --git a/infrastructure/pubsub/Cargo.toml b/infrastructure/pubsub/Cargo.toml index 891b96adba..67f5e08473 100644 --- a/infrastructure/pubsub/Cargo.toml +++ b/infrastructure/pubsub/Cargo.toml @@ -13,4 +13,4 @@ edition = "2018" [dependencies] tari_broadcast_channel = { version="^0.0", path = "../broadcast_channel" } -futures = { version = "=0.3.0-alpha.18", package = "futures-preview", features=["async-await", "nightly", "compat"] } +futures = { version = "=0.3.0-alpha.19", package = "futures-preview", features=["async-await"] } diff --git a/infrastructure/pubsub/src/lib.rs b/infrastructure/pubsub/src/lib.rs index 8ff773b845..84063d2dfd 100644 --- a/infrastructure/pubsub/src/lib.rs +++ b/infrastructure/pubsub/src/lib.rs @@ -19,7 +19,7 @@ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -use futures::{compat::Compat, future, prelude::*, stream::Fuse}; +use futures::{future, prelude::*, stream::Fuse}; use std::fmt::Debug; use tari_broadcast_channel::{bounded, Publisher, Subscriber}; @@ -76,11 +76,6 @@ where }) } - /// Provide a Compat wrapped version of the subscription stream for things that want to consume old-style streams - pub fn get_subscription_compat(&self, topic: T) -> Compat>> { - self.get_subscription(topic).map(|i| Ok(i)).compat() - } - /// Provide a fused version of the subscription stream so that domain modules don't need to know about fuse() pub fn get_subscription_fused(&self, topic: T) -> Fuse> { self.get_subscription(topic).fuse() diff --git a/rust-toolchain b/rust-toolchain index e608779c5a..fb7648c5aa 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2019-09-13 +nightly-2019-10-04