diff --git a/Cargo.lock b/Cargo.lock index 237416e70..8fec0b6be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -909,15 +909,15 @@ dependencies = [ [[package]] name = "etcd-client" -version = "0.12.4" -source = "git+https://github.com/Phoenix500526/etcd-client?branch=update-tonic#6845c0beb1f7acb04224751773666ff149a94e1f" +version = "0.12.5" +source = "git+https://github.com/Phoenix500526/etcd-client?branch=update-tonic#3b4f3ef00d69082a0393ebcb4b654fc9d945bece" dependencies = [ "http", "prost", "tokio", "tokio-stream 0.1.15", "tonic", - "tonic-build 0.10.2", + "tonic-build", "tower", "tower-service", ] @@ -1587,7 +1587,7 @@ dependencies = [ "prost-build", "quote", "syn 2.0.60", - "tonic-build 0.11.0", + "tonic-build", ] [[package]] @@ -3068,19 +3068,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tonic-build" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "quote", - "syn 2.0.60", -] - [[package]] name = "tonic-build" version = "0.11.0" diff --git a/Cargo.toml b/Cargo.toml index 0234d7569..ca9100876 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,10 @@ resolver = "2" ignored = ["prost", "workspace-hack"] [patch.crates-io] +# This branch update the tonic version for madsim. We should switch to the original etcd-client crate when new version release. madsim = { git = "https://github.com/Phoenix500526/madsim.git", branch = "update-tonic" } madsim-tonic = { git = "https://github.com/Phoenix500526/madsim.git", branch = "update-tonic" } madsim-tonic-build = { git = "https://github.com/Phoenix500526/madsim.git", branch = "update-tonic" } madsim-tokio = { git = "https://github.com/Phoenix500526/madsim.git", branch = "update-tonic" } +# TODO: switch to the original etcd-client crate when new version is released(https://github.com/etcdv3/etcd-client/pull/75) +etcd-client = { git = "https://github.com/Phoenix500526/etcd-client", branch = "update-tonic" } diff --git a/crates/benchmark/Cargo.toml b/crates/benchmark/Cargo.toml index d777cb808..6714f1928 100644 --- a/crates/benchmark/Cargo.toml +++ b/crates/benchmark/Cargo.toml @@ -16,8 +16,7 @@ repository = "https://github.com/xline-kv/Xline/tree/master/benchmark" anyhow = "1.0.82" clap = { version = "4", features = ["derive"] } clippy-utilities = "0.2.0" -# TODO: switch to the original etcd-client crate when new version is released -etcd-client = { git = "https://github.com/Phoenix500526/etcd-client", branch = "update-tonic", features = ["tls"] } +etcd-client = { version = "0.12.5", features = ["tls"] } indicatif = "0.17.8" rand = "0.8.5" thiserror = "1.0.58" diff --git a/crates/xline/Cargo.toml b/crates/xline/Cargo.toml index bd8c79393..86694058d 100644 --- a/crates/xline/Cargo.toml +++ b/crates/xline/Cargo.toml @@ -78,8 +78,7 @@ xlineapi = { path = "../xlineapi" } tonic-build = { version = "0.4.3", package = "madsim-tonic-build" } [dev-dependencies] -# TODO: switch to the original etcd-client crate when new version is released -etcd-client = { git = "https://github.com/Phoenix500526/etcd-client", branch = "update-tonic", features = ["tls"] } +etcd-client = { version = "0.12.5", features = ["tls"] } mockall = "0.12.1" rand = "0.8.5" strum = "0.26" diff --git a/crates/xlinectl/Cargo.toml b/crates/xlinectl/Cargo.toml index 5dd9c035e..d2db1880a 100644 --- a/crates/xlinectl/Cargo.toml +++ b/crates/xlinectl/Cargo.toml @@ -18,7 +18,6 @@ serde = { version = "1.0.137", features = ["derive"] } serde_json = "1.0.107" shlex = "1.3.0" tokio = "1" -# tonic = "0.11.0" tonic = { version = "0.4.2", package = "madsim-tonic" } utils = { path = "../utils" } workspace-hack = { version = "0.1", path = "../../workspace-hack" } diff --git a/crates/xlinectl/src/main.rs b/crates/xlinectl/src/main.rs index 7ca444652..42fbd82b3 100644 --- a/crates/xlinectl/src/main.rs +++ b/crates/xlinectl/src/main.rs @@ -164,10 +164,7 @@ use clap::{arg, value_parser, Command}; use command::compaction; use ext_utils::config::ClientConfig; use tokio::fs; -// #[cfg(not(madsim))] use tonic::transport::{Certificate, ClientTlsConfig}; -// #[cfg(madsim)] -// use utils::ClientTlsConfig; use xline_client::{Client, ClientOptions}; use crate::{