From 959986ab450476914fe5a6a8ee437082d68336e0 Mon Sep 17 00:00:00 2001 From: Eirik A Date: Fri, 22 Mar 2024 17:03:42 +0000 Subject: [PATCH] Workspacify deps (#1435) * cargo autoinherit Signed-off-by: clux * fix syntax broken by autoinherit Signed-off-by: clux * lift stuff that's examples only out of workspace Signed-off-by: clux * convert to simpler form Signed-off-by: clux --------- Signed-off-by: clux --- Cargo.toml | 57 ++++++++++++++++++++++++++ e2e/Cargo.toml | 14 +++---- examples/Cargo.toml | 44 ++++++++++----------- kube-client/Cargo.toml | 88 +++++++++++++++++++---------------------- kube-core/Cargo.toml | 34 ++++++---------- kube-derive/Cargo.toml | 24 +++++------ kube-runtime/Cargo.toml | 53 +++++++++++-------------- kube/Cargo.toml | 29 ++++++-------- 8 files changed, 185 insertions(+), 158 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7ce3bf89e..3f333b310 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,3 +12,60 @@ members = [ "e2e", "examples", ] + +[workspace.dependencies] +ahash = "0.8" +anyhow = "1.0.71" +assert-json-diff = "2.0.2" +async-trait = "0.1.64" +backoff = "0.4.0" +base64 = "0.22.0" +bytes = "1.1.0" +chrono = { version = "0.4.23", default-features = false } +darling = "0.20.3" +derivative = "2.1.1" +either = "1.6.1" +form_urlencoded = "1.2.0" +futures = "0.3.17" +hashbrown = "0.14.0" +home = "0.5.4" +http = "0.2.9" +http-body = "0.4.2" +hyper = "0.14.27" +hyper-openssl = "0.9.2" +hyper-rustls = "0.24.0" +hyper-socks2 = { version = "0.8.0", default-features = false } +hyper-timeout = "0.4.1" +json-patch = "1.0.0" +jsonpath-rust = "0.5.0" +k8s-openapi = { version = "0.21.0", default-features = false } +once_cell = "1.8.0" +openssl = "0.10.36" +parking_lot = "0.12.0" +pem = "3.0.1" +pin-project = "1.0.4" +proc-macro2 = "1.0.29" +quote = "1.0.10" +rand = "0.8.3" +rustls = "0.21.4" +rustls-pemfile = "1.0.0" +schemars = "0.8.6" +secrecy = "0.8.0" +serde = "1.0.130" +serde_json = "1.0.68" +serde_yaml = "0.9.19" +smallvec = "1.7.0" +syn = "2.0.38" +tame-oauth = "0.9.1" +tempfile = "3.1.0" +thiserror = "1.0.29" +tokio = "1.14.0" +tokio-test = "0.4.0" +tokio-tungstenite = "0.20.0" +tokio-util = "0.7.0" +tower = "0.4.13" +tower-http = "0.4.0" +tower-test = "0.4.0" +tracing = "0.1.36" +tracing-subscriber = "0.3.17" +trybuild = "1.0.48" diff --git a/e2e/Cargo.toml b/e2e/Cargo.toml index 484c362dd..9e3e16ccc 100644 --- a/e2e/Cargo.toml +++ b/e2e/Cargo.toml @@ -24,11 +24,11 @@ rustls = ["kube/rustls-tls"] openssl = ["kube/openssl-tls"] [dependencies] -anyhow = "1.0.44" -tracing = "0.1.36" -tracing-subscriber = "0.3.3" -futures = "0.3.17" +anyhow.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +futures.workspace = true kube = { path = "../kube", version = "^0.88.1", default-features = false, features = ["client", "runtime", "ws", "admission", "gzip"] } -k8s-openapi = { version = "0.21.0", default-features = false } -serde_json = "1.0.68" -tokio = { version = "1.14.0", features = ["full"] } +k8s-openapi.workspace = true +serde_json.workspace = true +tokio = { workspace = true, features = ["full"] } diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 2e817fe3f..0d6e82023 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -26,37 +26,37 @@ ws = ["kube/ws"] latest = ["k8s-openapi/latest"] [dev-dependencies] -tokio-util = "0.7.0" -assert-json-diff = "2.0.1" +tokio-util.workspace = true +assert-json-diff.workspace = true garde = { version = "0.18.0", default-features = false, features = ["derive"] } -anyhow = "1.0.44" -futures = "0.3.17" -jsonpath-rust = "0.5.0" +anyhow.workspace = true +futures.workspace = true +jsonpath-rust.workspace = true kube = { path = "../kube", version = "^0.88.1", default-features = false, features = ["admission"] } kube-derive = { path = "../kube-derive", version = "^0.88.1", default-features = false } # only needed to opt out of schema -k8s-openapi = { version = "0.21.0", default-features = false } -serde = { version = "1.0.130", features = ["derive"] } -serde_json = "1.0.68" -serde_yaml = "0.9.19" -tokio = { version = "1.14.0", features = ["full"] } -either = "1.6.1" -schemars = "0.8.6" +k8s-openapi.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +serde_yaml.workspace = true +tokio = { workspace = true, features = ["full"] } +either.workspace = true +schemars.workspace = true static_assertions = "1.1.0" tar = "0.4.37" -tracing = "0.1.36" -tracing-subscriber = "0.3.3" +tracing.workspace = true +tracing-subscriber.workspace = true warp = { version = "0.3", default-features = false, features = ["tls"] } -http = "0.2.5" -json-patch = "1.0.0" -tower = { version = "0.4.13", features = ["limit"] } -tower-http = { version = "0.4.0", features = ["trace", "decompression-gzip"] } -hyper = { version = "0.14.13", features = ["client", "http1", "stream", "tcp"] } -thiserror = "1.0.29" -backoff = "0.4.0" +http.workspace = true +json-patch.workspace = true +tower = { workspace = true, features = ["limit"] } +tower-http = { workspace = true, features = ["trace", "decompression-gzip"] } +hyper = { workspace = true, features = ["client", "http1", "stream", "tcp"] } +thiserror.workspace = true +backoff.workspace = true clap = { version = "4.0", default-features = false, features = ["std", "cargo", "derive"] } edit = "0.1.3" tokio-stream = { version = "0.1.9", features = ["net"] } -crossterm = {version = "0.27.0" } +crossterm = "0.27.0" [[example]] name = "configmapgen_controller" diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index fbaf7b0dc..6a27b8e53 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -40,55 +40,47 @@ features = ["client", "rustls-tls", "openssl-tls", "ws", "oauth", "oidc", "jsonp rustdoc-args = ["--cfg", "docsrs"] [dependencies] -base64 = { version = "0.22.0", optional = true } -chrono = { version = "0.4.23", optional = true, default-features = false } -home = { version = "0.5.4", optional = true } -serde = { version = "1.0.130", features = ["derive"] } -serde_json = "1.0.68" -serde_yaml = { version = "0.9.19", optional = true } -http = "0.2.5" -http-body = { version = "0.4.2", optional = true } -either = { version = "1.6.1", optional = true } -thiserror = "1.0.29" -futures = { version = "0.3.17", optional = true } -pem = { version = "3.0.1", optional = true } -openssl = { version = "0.10.36", optional = true } -rustls = { version = "0.21.4", features = ["dangerous_configuration"], optional = true } -rustls-pemfile = { version = "1.0.0", optional = true } -bytes = { version = "1.1.0", optional = true } -tokio = { version = "1.14.0", features = ["time", "signal", "sync"], optional = true } +base64 = { workspace = true, optional = true } +chrono = { workspace = true, optional = true } +home = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +serde_yaml = { workspace = true, optional = true } +http.workspace = true +http-body = { workspace = true, optional = true } +either = { workspace = true, optional = true } +thiserror.workspace = true +futures = { workspace = true, optional = true } +pem = { workspace = true, optional = true } +openssl = { workspace = true, optional = true } +rustls = { workspace = true, features = ["dangerous_configuration"], optional = true } +rustls-pemfile = { workspace = true, optional = true } +bytes = { workspace = true, optional = true } +tokio = { workspace = true, features = ["time", "signal", "sync"], optional = true } kube-core = { path = "../kube-core", version = "=0.88.1" } -jsonpath-rust = { version = "0.5.0", optional = true } -tokio-util = { version = "0.7.0", optional = true, features = ["io", "codec"] } -hyper = { version = "0.14.13", optional = true, features = ["client", "http1", "stream", "tcp"] } -hyper-rustls = { version = "0.24.0", optional = true } -hyper-socks2 = { version = "0.8.0", optional = true, default-features = false } -tokio-tungstenite = { version = "0.20.0", optional = true } -tower = { version = "0.4.13", optional = true, features = ["buffer", "filter", "util"] } -tower-http = { version = "0.4.0", optional = true, features = ["auth", "map-response-body", "trace"] } -hyper-timeout = {version = "0.4.1", optional = true } -tame-oauth = { version = "0.9.1", features = ["gcp"], optional = true } -pin-project = { version = "1.0.4", optional = true } -rand = { version = "0.8.3", optional = true } -secrecy = { version = "0.8.0", features = ["alloc", "serde"] } -tracing = { version = "0.1.36", features = ["log"], optional = true } -hyper-openssl = { version = "0.9.2", optional = true } -form_urlencoded = { version = "1.2.0", optional = true } - -[dependencies.k8s-openapi] -version = "0.21.0" -default-features = false -features = [] +jsonpath-rust = { workspace = true, optional = true } +tokio-util = { workspace = true, features = ["io", "codec"], optional = true } +hyper = { workspace = true, features = ["client", "http1", "stream", "tcp"], optional = true } +hyper-rustls = { workspace = true, optional = true } +hyper-socks2 = { workspace = true, optional = true } +tokio-tungstenite = { workspace = true, optional = true } +tower = { workspace = true, features = ["buffer", "filter", "util"], optional = true } +tower-http = { workspace = true, features = ["auth", "map-response-body", "trace"], optional = true } +hyper-timeout = { workspace = true, optional = true } +tame-oauth = { workspace = true, features = ["gcp"], optional = true } +pin-project = { workspace = true, optional = true } +rand = { workspace = true, optional = true } +secrecy = { workspace = true, features = ["alloc", "serde"] } +tracing = { workspace = true, features = ["log"], optional = true } +hyper-openssl = { workspace = true, optional = true } +form_urlencoded = { workspace = true, optional = true } +k8s-openapi= { workspace = true, features = [] } [dev-dependencies] kube = { path = "../kube", features = ["derive", "client", "ws"], version = "<1.0.0, >=0.61.0" } -tempfile = "3.1.0" -tokio = { version = "1.14.0", features = ["full"] } -schemars = "0.8.6" -tokio-test = "0.4.0" -tower-test = "0.4.0" - -[dev-dependencies.k8s-openapi] -version = "0.21.0" -default-features = false -features = ["latest"] +tempfile.workspace = true +tokio = { workspace = true, features = ["full"] } +schemars.workspace = true +tokio-test.workspace = true +tower-test.workspace = true +k8s-openapi= { workspace = true, features = ["latest"] } diff --git a/kube-core/Cargo.toml b/kube-core/Cargo.toml index cba219362..b85477034 100644 --- a/kube-core/Cargo.toml +++ b/kube-core/Cargo.toml @@ -26,27 +26,19 @@ schema = ["schemars"] kubelet-debug = ["ws"] [dependencies] -serde = { version = "1.0.130", features = ["derive"] } -serde_json = "1.0.68" -thiserror = "1.0.29" -form_urlencoded = "1.0.1" -http = "0.2.5" -json-patch = { version = "1.0.0", optional = true } -once_cell = "1.8.0" -chrono = { version = "0.4.19", default-features = false, features = ["clock"] } -schemars = { version = "0.8.6", optional = true } - -[dependencies.k8s-openapi] -version = "0.21.0" -default-features = false -features = [] - -[dev-dependencies.k8s-openapi] -version = "0.21.0" -default-features = false -features = ["latest"] +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +thiserror.workspace = true +form_urlencoded.workspace = true +http.workspace = true +json-patch = { workspace = true, optional = true } +once_cell.workspace = true +chrono = { workspace = true, features = ["clock"] } +schemars = { workspace = true, optional = true } +k8s-openapi.workspace = true [dev-dependencies] -assert-json-diff = "2.0.1" +k8s-openapi = { workspace = true, features = ["latest"] } +assert-json-diff.workspace = true kube = { path = "../kube", version = "<1.0.0, >=0.53.0" } -serde_yaml = "0.9.19" +serde_yaml.workspace = true diff --git a/kube-derive/Cargo.toml b/kube-derive/Cargo.toml index 0b91b9ff2..4729c0d3f 100644 --- a/kube-derive/Cargo.toml +++ b/kube-derive/Cargo.toml @@ -16,21 +16,21 @@ categories = ["api-bindings", "encoding"] [dependencies] -proc-macro2 = "1.0.29" -quote = "1.0.10" -syn = { version = "2.0.38", features = ["extra-traits"] } -serde_json = "1.0.68" -darling = "0.20.3" +proc-macro2.workspace = true +quote.workspace = true +syn = { workspace = true, features = ["extra-traits"] } +serde_json.workspace = true +darling.workspace = true [lib] proc-macro = true [dev-dependencies] -serde = { version = "1.0.130", features = ["derive"] } -serde_yaml = "0.9.19" +serde = { workspace = true, features = ["derive"] } +serde_yaml.workspace = true kube = { path = "../kube", version = "<1.0.0, >=0.61.0", features = ["derive", "client"] } -k8s-openapi = { version = "0.21.0", default-features = false, features = ["latest"] } -schemars = { version = "0.8.6", features = ["chrono"] } -chrono = { version = "0.4.19", default-features = false } -trybuild = "1.0.48" -assert-json-diff = "2.0.2" +k8s-openapi = { workspace = true, features = ["latest"] } +schemars = { workspace = true, features = ["chrono"] } +chrono.workspace = true +trybuild.workspace = true +assert-json-diff.workspace = true diff --git a/kube-runtime/Cargo.toml b/kube-runtime/Cargo.toml index 907de19dc..5aac630f7 100644 --- a/kube-runtime/Cargo.toml +++ b/kube-runtime/Cargo.toml @@ -27,37 +27,30 @@ features = ["k8s-openapi/latest", "unstable-runtime"] rustdoc-args = ["--cfg", "docsrs"] [dependencies] -futures = "0.3.17" +futures.workspace = true kube-client = { path = "../kube-client", version = "=0.88.1", default-features = false, features = ["jsonpatch", "client"] } -derivative = "2.1.1" -serde = "1.0.130" -smallvec = "1.7.0" -ahash = "0.8" -parking_lot = "0.12.0" -pin-project = "1.0.2" -tokio = { version = "1.14.0", features = ["time"] } -tokio-util = { version = "0.7.0", features = ["time"] } -tracing = "0.1.36" -json-patch = "1.0.0" -serde_json = "1.0.68" -thiserror = "1.0.29" -backoff = "0.4.0" -async-trait = "0.1.64" -hashbrown = "0.14.0" - -[dependencies.k8s-openapi] -version = "0.21.0" -default-features = false +derivative.workspace = true +serde.workspace = true +smallvec.workspace = true +ahash.workspace = true +parking_lot.workspace = true +pin-project.workspace = true +tokio = { workspace = true, features = ["time"] } +tokio-util = { workspace = true, features = ["time"] } +tracing.workspace = true +json-patch.workspace = true +serde_json.workspace = true +thiserror.workspace = true +backoff.workspace = true +async-trait.workspace = true +hashbrown.workspace = true +k8s-openapi.workspace = true [dev-dependencies] kube = { path = "../kube", features = ["derive", "client", "runtime"], version = "<1.0.0, >=0.60.0" } -serde_json = "1.0.68" -tokio = { version = "1.14.0", features = ["full", "test-util"] } -rand = "0.8.0" -schemars = "0.8.6" -tracing-subscriber = "0.3.17" - -[dev-dependencies.k8s-openapi] -version = "0.21.0" -default-features = false -features = ["latest"] +serde_json.workspace = true +tokio = { workspace = true, features = ["full", "test-util"] } +rand.workspace = true +schemars.workspace = true +tracing-subscriber.workspace = true +k8s-openapi= { workspace = true, features = ["latest"] } diff --git a/kube/Cargo.toml b/kube/Cargo.toml index 62f9f1fd2..4c71d5be2 100644 --- a/kube/Cargo.toml +++ b/kube/Cargo.toml @@ -50,25 +50,18 @@ kube-derive = { path = "../kube-derive", version = "=0.88.1", optional = true } kube-core = { path = "../kube-core", version = "=0.88.1" } kube-client = { path = "../kube-client", version = "=0.88.1", default-features = false, optional = true } kube-runtime = { path = "../kube-runtime", version = "=0.88.1", optional = true} - # Not used directly, but required by resolver 2.0 to ensure that the k8s-openapi dependency # is considered part of the "deps" graph rather than just the "dev-deps" graph -[dependencies.k8s-openapi] -version = "0.21.0" -default-features = false +k8s-openapi.workspace = true [dev-dependencies] -tokio = { version = "1.14.0", features = ["full"] } -futures = "0.3.17" -serde_json = "1.0.68" -serde = { version = "1.0.130", features = ["derive"] } -schemars = "0.8.6" -hyper = "0.14.27" -http = "0.2.9" -tower-test = "0.4.0" -anyhow = "1.0.71" - -[dev-dependencies.k8s-openapi] -version = "0.21.0" -default-features = false -features = ["latest"] +tokio = { workspace = true, features = ["full"] } +futures.workspace = true +serde_json.workspace = true +serde = { workspace = true, features = ["derive"] } +schemars.workspace = true +hyper.workspace = true +http.workspace = true +tower-test.workspace = true +anyhow.workspace = true +k8s-openapi = { workspace = true, features = ["latest"] }