Skip to content

Commit

Permalink
Upgrade tonic, tokio and prost
Browse files Browse the repository at this point in the history
This is a major version change to tokio. This new version of tokio
should be completely compatible with stl.
  • Loading branch information
allada committed Jan 21, 2021
1 parent 52b9ddb commit 14eebc6
Show file tree
Hide file tree
Showing 50 changed files with 782 additions and 2,119 deletions.
533 changes: 167 additions & 366 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 7 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ version = "0.0.0"
path = "needed_only_to_make_cargo_tooling_happy.rs"

[dependencies]
prost = "0.6.1"
prost-types = "0.6.1"
prost = "0.7.0"
prost-types = "0.7.0"
hex = "0.4.2"
async-mutex = "1.4.0"
async-trait = "0.1.42"
fixed-buffer = "0.2.2"
futures = "0.3.8"
# We must use tokio 0.2.x because tonic runtime uses it.
tokio = { version = "0.2", features = ["macros", "io-util", "fs", "rt-threaded"] }
tonic = "0.3.1"
futures = "0.3.12"
tokio = { version = "1.0.2", features = ["macros", "io-util", "fs", "rt-multi-thread"] }
tokio-stream = "0.1.2"
tonic = "0.4.0"
lazy-init = "0.4.0"
log = "0.4.11"
env_logger = "0.8.2"
Expand All @@ -29,8 +29,7 @@ lru = "0.6.3"
[dev-dependencies]
clap = "2.33.3"
stdext = "0.2.1"
prost-build = "0.6.1"
bytes = "0.5.6"
prost-build = "0.7.0"
tonic-build = "0.3.1"
pretty_assertions = "0.6.1"
rustfmt-nightly = "1.4.21"
Expand All @@ -45,7 +44,6 @@ gen_buildrs = true
additional_deps = ["@com_google_protobuf//:protoc"]
additional_env = { PROTOC = "bazel-out/host/bin/external/com_google_protobuf/protoc" }


[package.metadata.raze.crates.rustfmt-nightly.'*']
gen_buildrs = true
extra_aliased_targets = [
Expand Down Expand Up @@ -79,7 +77,6 @@ targets = [

output_buildfile_suffix = "BUILD"


# The two acceptable options are "Remote" and "Vendored" which
# is used to idnicate whether the user is using a non-vendored or
# vendored set of dependencies.
Expand Down
2 changes: 1 addition & 1 deletion cas/grpc_service/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ rust_test(
"//cas/store",
"//config",
"//proto",
"//third_party:bytes",
"//third_party:maplit",
"//third_party:pretty_assertions",
"//third_party:prost",
"//third_party:tokio",
"//third_party:tokio_stream",
"//third_party:tonic",
"//util:common",
"//util:error",
Expand Down
4 changes: 2 additions & 2 deletions cas/grpc_service/tests/bytestream_server_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub mod write_tests {

// Utility to encode our proto into GRPC stream format.
fn encode<T: Message>(proto: &T) -> Result<Bytes, Box<dyn std::error::Error>> {
use bytes::{BufMut, BytesMut};
use prost::bytes::{BufMut, BytesMut};
let mut buf = BytesMut::new();
// See below comment on spec.
use std::mem::size_of;
Expand Down Expand Up @@ -176,7 +176,7 @@ pub mod read_tests {
use super::*;
use pretty_assertions::assert_eq; // Must be declared in every module.

use tokio::stream::StreamExt;
use tokio_stream::StreamExt;

use proto::google::bytestream::{
byte_stream_server::ByteStream, // Needed to call .read().
Expand Down
28 changes: 14 additions & 14 deletions third_party/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ alias(
],
)

alias(
name = "bytes",
actual = "@raze__bytes__0_5_6//:bytes",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "clap",
actual = "@raze__clap__2_33_3//:clap",
Expand Down Expand Up @@ -158,7 +149,7 @@ alias(

alias(
name = "prost",
actual = "@raze__prost__0_6_1//:prost",
actual = "@raze__prost__0_7_0//:prost",
tags = [
"cargo-raze",
"manual",
Expand All @@ -167,7 +158,7 @@ alias(

alias(
name = "prost_build",
actual = "@raze__prost_build__0_6_1//:prost_build",
actual = "@raze__prost_build__0_7_0//:prost_build",
tags = [
"cargo-raze",
"manual",
Expand All @@ -176,7 +167,7 @@ alias(

alias(
name = "prost_types",
actual = "@raze__prost_types__0_6_1//:prost_types",
actual = "@raze__prost_types__0_7_0//:prost_types",
tags = [
"cargo-raze",
"manual",
Expand Down Expand Up @@ -223,7 +214,16 @@ alias(

alias(
name = "tokio",
actual = "@raze__tokio__0_2_24//:tokio",
actual = "@raze__tokio__1_0_2//:tokio",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "tokio_stream",
actual = "@raze__tokio_stream__0_1_2//:tokio_stream",
tags = [
"cargo-raze",
"manual",
Expand All @@ -232,7 +232,7 @@ alias(

alias(
name = "tonic",
actual = "@raze__tonic__0_3_1//:tonic",
actual = "@raze__tonic__0_4_0//:tonic",
tags = [
"cargo-raze",
"manual",
Expand Down
Loading

0 comments on commit 14eebc6

Please sign in to comment.