From 4189221470a94dccb6184f55342cdc6381a4a019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 6 Dec 2022 13:43:42 +0100 Subject: [PATCH] inherit shared, external dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit noteworthy changes: - proxmox-http had a default_features_false dep on hyper, which is dropped (the default feature is empty anyway) - hyper, libc, nix, tokio and url versions are unified - missing (cosmetic) bindgen feature on zstd enabled everywhere Signed-off-by: Fabian Grünbichler --- Cargo.toml | 27 +++++++++++++++++++++++++++ proxmox-api-macro/Cargo.toml | 14 +++++++------- proxmox-async/Cargo.toml | 10 +++++----- proxmox-compression/Cargo.toml | 14 +++++++------- proxmox-http/Cargo.toml | 18 +++++++++--------- proxmox-io/Cargo.toml | 4 ++-- proxmox-metrics/Cargo.toml | 16 ++++++++-------- proxmox-rest-server/Cargo.toml | 30 +++++++++++++++--------------- proxmox-router/Cargo.toml | 18 +++++++++--------- proxmox-schema/Cargo.toml | 16 ++++++++-------- proxmox-section-config/Cargo.toml | 8 ++++---- proxmox-serde/Cargo.toml | 10 +++++----- proxmox-shared-memory/Cargo.toml | 6 +++--- proxmox-sortable-macro/Cargo.toml | 6 +++--- proxmox-subscription/Cargo.toml | 14 +++++++------- proxmox-sys/Cargo.toml | 18 +++++++++--------- proxmox-tfa/Cargo.toml | 18 +++++++++--------- proxmox-time/Cargo.toml | 6 +++--- proxmox-uuid/Cargo.toml | 8 ++++---- 19 files changed, 144 insertions(+), 117 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a92f4a0b..f0f2efc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,3 +30,30 @@ edition = "2021" license = "AGPL-3" repository = "https://git.proxmox.com/?p=proxmox.git" exclude = [ "debian" ] + +[workspace.dependencies] +# any features enabled here are enabled on all members using 'workspace = true'! + +# external dependencies +anyhow = "1.0" +base64 = "0.13" +endian_trait = "0.6" +futures = "0.3" +hex = "0.4" +http = "0.2" +hyper = "0.14.5" +lazy_static = "1.4" +libc = "0.2.107" +log = "0.4.17" +nix = "0.24.1" +openssl = "0.10" +percent-encoding = "2.1" +proc-macro2 = "1.0" +quote = "1.0" +serde = "1.0" +serde_json = "1.0" +syn = { version = "1.0", features = [ "full", "visit-mut" ] } +tokio = "1.6" +tokio-openssl = "0.6.1" +url = "2.2" +zstd = { version = "0.6", features = [ "bindgen" ] } diff --git a/proxmox-api-macro/Cargo.toml b/proxmox-api-macro/Cargo.toml index 22d45fdf..33863d29 100644 --- a/proxmox-api-macro/Cargo.toml +++ b/proxmox-api-macro/Cargo.toml @@ -13,15 +13,15 @@ exclude.workspace = true proc-macro = true [dependencies] -anyhow = "1.0" -proc-macro2 = "1.0" -quote = "1.0" -syn = { version = "1.0", features = [ "extra-traits", "full", "visit-mut" ] } +anyhow.workspace = true +proc-macro2.workspace = true +quote.workspace = true +syn = { workspace = true , features = [ "extra-traits" ] } [dev-dependencies] -futures = "0.3" -serde = { version = "1.0", features = [ "derive" ] } -serde_json = "1.0" +futures.workspace = true +serde = { workspace = true, features = [ "derive" ] } +serde_json.workspace = true [dev-dependencies.proxmox-schema] version = "1.0.0" diff --git a/proxmox-async/Cargo.toml b/proxmox-async/Cargo.toml index db7ed14f..3a9b46bc 100644 --- a/proxmox-async/Cargo.toml +++ b/proxmox-async/Cargo.toml @@ -10,14 +10,14 @@ description = "Proxmox async/tokio helpers" exclude.workspace = true [dependencies] -anyhow = "1.0" -futures = "0.3" -lazy_static = "1.4" +anyhow.workspace = true +futures.workspace = true +lazy_static.workspace = true pin-utils = "0.1.0" -tokio = { version = "1.0", features = [ "net", "rt", "rt-multi-thread", "sync"] } +tokio = { workspace = true, features = [ "net", "rt", "rt-multi-thread", "sync"] } proxmox-io = { path = "../proxmox-io", version = "1", features = [ "tokio" ] } proxmox-lang = { path = "../proxmox-lang", version = "1.1" } [dev-dependencies] -tokio = { version = "1.6", features = [ "macros" ] } +tokio = { workspace = true, features = [ "macros" ] } diff --git a/proxmox-compression/Cargo.toml b/proxmox-compression/Cargo.toml index d863e4a0..6a3ad96a 100644 --- a/proxmox-compression/Cargo.toml +++ b/proxmox-compression/Cargo.toml @@ -10,22 +10,22 @@ description = "contains compression utilitites (such as an Zip Encoder for async exclude.workspace = true [dependencies] -anyhow = "1.0" +anyhow.workspace = true bytes = "1.0" crc32fast = "1" -endian_trait = { version = "0.6" } +endian_trait.workspace = true flate2 = "1.0" -futures = "0.3" -libc = "0.2" -tokio = { version = "1.6", features = [ "fs", "io-util"] } +futures.workspace = true +libc.workspace = true +tokio = { workspace = true, features = [ "fs", "io-util"] } walkdir = "2" tar = "0.4" -zstd = { version = "0.6", features = []} +zstd.workspace = true proxmox-time = { path = "../proxmox-time", version = "1" } proxmox-io = { path = "../proxmox-io", version = "1", features = [ "tokio" ] } proxmox-lang = { path = "../proxmox-lang", version = "1.1" } [dev-dependencies] -tokio = { version = "1.6", features = [ "macros" ] } +tokio = { workspace = true, features = [ "macros" ] } diff --git a/proxmox-http/Cargo.toml b/proxmox-http/Cargo.toml index 81520e6a..eadb9dbf 100644 --- a/proxmox-http/Cargo.toml +++ b/proxmox-http/Cargo.toml @@ -10,17 +10,17 @@ description = "Proxmox HTTP library" exclude.workspace = true [dependencies] -anyhow = "1.0" -base64 = { version = "0.13", optional = true } -futures = { version = "0.3", optional = true } -http = { version = "0.2", optional = true } -hyper = { version = "0.14", default_features = false, optional = true } +anyhow.workspace = true +base64 = { workspace = true, optional = true } +futures = { workspace = true, optional = true } +http = { workspace = true, optional = true } +hyper = { workspace = true, optional = true } openssl = { version = "0.10", optional = true } -serde_json = { version = "1.0", optional = true } -tokio = { version = "1.0", features = [], optional = true } -tokio-openssl = { version = "0.6.1", optional = true } +serde_json = { workspace = true, optional = true } +tokio = { workspace = true, features = [], optional = true } +tokio-openssl = { workspace = true, optional = true } ureq = { version = "2.4", features = ["native-certs"], optional = true } -url = { version = "2", optional = true } +url = { workspace = true, optional = true } proxmox-async = { path = "../proxmox-async", optional = true, version = "0.4.1" } proxmox-sys = { path = "../proxmox-sys", optional = true, version = "0.4" } diff --git a/proxmox-io/Cargo.toml b/proxmox-io/Cargo.toml index c1194587..368f9fd3 100644 --- a/proxmox-io/Cargo.toml +++ b/proxmox-io/Cargo.toml @@ -10,6 +10,6 @@ description = "extension traits for Read and Write" exclude.workspace = true [dependencies] -endian_trait = { version = "0.6", features = ["arrays"] } +endian_trait = { workspace = true, features = ["arrays"] } # this is also the feature name: -tokio = { version = "1.0", features = [ "io-util" ], optional = true } +tokio = { workspace = true, features = [ "io-util" ], optional = true } diff --git a/proxmox-metrics/Cargo.toml b/proxmox-metrics/Cargo.toml index d6894b98..9967cdc8 100644 --- a/proxmox-metrics/Cargo.toml +++ b/proxmox-metrics/Cargo.toml @@ -10,14 +10,14 @@ description = "Metrics Server export utilitites" exclude.workspace = true [dependencies] -anyhow = "1.0" -futures = "0.3" -http = "0.2" -hyper = "0.14" -openssl = "0.10" -serde = "1.0" -serde_json = "1.0" -tokio = { version = "1.0", features = [ "net", "sync" ] } +anyhow.workspace = true +futures.workspace = true +http.workspace = true +hyper.workspace = true +openssl.workspace = true +serde.workspace = true +serde_json.workspace = true +tokio = { workspace = true, features = [ "net", "sync" ] } proxmox-async = { path = "../proxmox-async", features = [], version = "0.4" } proxmox-http = { path = "../proxmox-http", features = [ "client" ], version = "0.7" } diff --git a/proxmox-rest-server/Cargo.toml b/proxmox-rest-server/Cargo.toml index 1b63ac91..70b02cc6 100644 --- a/proxmox-rest-server/Cargo.toml +++ b/proxmox-rest-server/Cargo.toml @@ -11,28 +11,28 @@ exclude.workspace = true [dev-dependencies] proxmox-schema = { version = "1.3.1", features = [ "api-macro" ] } -tokio = { version = "1.6", features = [ "rt-multi-thread", "signal", "process" ] } +tokio = { workspace = true, features = [ "rt-multi-thread", "signal", "process" ] } [dependencies] -anyhow = "1.0" -futures = "0.3" +anyhow.workspace = true +futures.workspace = true handlebars = "3.0" -http = "0.2" -hyper = { version = "0.14.5", features = [ "full" ] } -lazy_static = "1.4" -libc = "0.2" -log = "0.4.17" -nix = "0.24" +http.workspace = true +hyper = { workspace = true, features = [ "full" ] } +lazy_static.workspace = true +libc.workspace = true +log.workspace = true +nix.workspace = true once_cell = "1.3.1" -percent-encoding = "2.1" +percent-encoding.workspace = true regex = "1.5" -serde = { version = "1.0", features = [ "derive" ] } -serde_json = "1.0" -tokio = { version = "1.6", features = ["signal", "process"] } -tokio-openssl = "0.6.1" +serde = { workspace = true, features = [ "derive" ] } +serde_json.workspace = true +tokio = { workspace = true, features = ["signal", "process"] } +tokio-openssl.workspace = true tokio-stream = "0.1.0" tower-service = "0.3.0" -url = "2.1" +url.workspace = true #proxmox = "0.15.3" proxmox-async = "0.4" diff --git a/proxmox-router/Cargo.toml b/proxmox-router/Cargo.toml index 69df972c..f4ad0482 100644 --- a/proxmox-router/Cargo.toml +++ b/proxmox-router/Cargo.toml @@ -10,20 +10,20 @@ description = "proxmox API Router and CLI utilities" exclude.workspace = true [dependencies] -anyhow = "1.0" +anyhow.workspace = true env_logger = { version = "0.9", optional = true } -http = { version = "0.2", optional = true } -hyper = { version = "0.14", features = [ "full" ], optional = true } -nix = "0.24.1" -percent-encoding = "2.1" -serde_json = "1.0" -serde = "1.0" +http = { workspace = true, optional = true } +hyper = { workspace = true, features = [ "full" ], optional = true } +nix.workspace = true +percent-encoding.workspace = true +serde_json.workspace = true +serde.workspace = true unicode-width ="0.1.8" # cli: -tokio = { version = "1.0", features = [], optional = true } +tokio = { workspace = true, features = [], optional = true } rustyline = { version = "9", optional = true } -libc = { version = "0.2", optional = true } +libc = { workspace = true, optional = true } proxmox-lang = { path = "../proxmox-lang", version = "1.1" } proxmox-schema = { path = "../proxmox-schema", version = "1.1" } diff --git a/proxmox-schema/Cargo.toml b/proxmox-schema/Cargo.toml index 46508703..9fdc85a5 100644 --- a/proxmox-schema/Cargo.toml +++ b/proxmox-schema/Cargo.toml @@ -10,22 +10,22 @@ description = "proxmox api schema and validation" exclude.workspace = true [dependencies] -anyhow = "1.0" -lazy_static = "1.4" +anyhow.workspace = true +lazy_static.workspace = true regex = "1.5" -serde = "1.0" -serde_json = "1.0" +serde.workspace = true +serde_json.workspace = true textwrap = "0.16" # the upid type needs this for 'getpid' -libc = { version = "0.2", optional = true } -nix = { version = "0.24.1", optional = true } +libc = { workspace = true, optional = true } +nix = { workspace = true, optional = true } proxmox-api-macro = { path = "../proxmox-api-macro", optional = true, version = "1.0.3" } [dev-dependencies] -url = "2.1" -serde = { version = "1.0", features = [ "derive" ] } +url.workspace = true +serde = { workspace = true, features = [ "derive" ] } proxmox-api-macro = { path = "../proxmox-api-macro", version = "1.0.3" } [features] diff --git a/proxmox-section-config/Cargo.toml b/proxmox-section-config/Cargo.toml index 86eb5d9a..8f307763 100644 --- a/proxmox-section-config/Cargo.toml +++ b/proxmox-section-config/Cargo.toml @@ -10,10 +10,10 @@ description = "proxmox schema based section config format parsing" exclude.workspace = true [dependencies] -anyhow = "1.0" -hex = "0.4" -serde = "1.0" -serde_json = "1.0" +anyhow.workspace = true +hex.workspace = true +serde.workspace = true +serde_json.workspace = true proxmox-schema = { path = "../proxmox-schema", version = "1.1" } # FIXME: remove! diff --git a/proxmox-serde/Cargo.toml b/proxmox-serde/Cargo.toml index 8f388267..879b1911 100644 --- a/proxmox-serde/Cargo.toml +++ b/proxmox-serde/Cargo.toml @@ -10,12 +10,12 @@ description = "Serde formatting tools" exclude.workspace = true [dependencies] -anyhow = "1.0" -base64 = "0.13" -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0", optional = true } +anyhow.workspace = true +base64.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true, optional = true } proxmox-time = { path = "../proxmox-time", version = "1.0.0" } [dev-dependencies] -serde_json = "1.0" +serde_json.workspace = true diff --git a/proxmox-shared-memory/Cargo.toml b/proxmox-shared-memory/Cargo.toml index 06d15355..f2b473c0 100644 --- a/proxmox-shared-memory/Cargo.toml +++ b/proxmox-shared-memory/Cargo.toml @@ -10,8 +10,8 @@ description = "Shared memory helpers and shared mutex implementation" exclude.workspace = true [dependencies] -anyhow = "1.0" -libc = "0.2.107" -nix = "0.24.1" +anyhow.workspace = true +libc.workspace = true +nix.workspace = true proxmox-sys = { path = "../proxmox-sys", version = "0.4" } diff --git a/proxmox-sortable-macro/Cargo.toml b/proxmox-sortable-macro/Cargo.toml index c702c646..60954c6f 100644 --- a/proxmox-sortable-macro/Cargo.toml +++ b/proxmox-sortable-macro/Cargo.toml @@ -13,6 +13,6 @@ exclude.workspace = true proc-macro = true [dependencies] -proc-macro2 = "1.0" -quote = "1.0" -syn = { version = "1.0", features = [ "full", "visit-mut" ] } +proc-macro2.workspace = true +quote.workspace = true +syn = { workspace = true } diff --git a/proxmox-subscription/Cargo.toml b/proxmox-subscription/Cargo.toml index 6a42e17e..9ecc39e5 100644 --- a/proxmox-subscription/Cargo.toml +++ b/proxmox-subscription/Cargo.toml @@ -10,14 +10,14 @@ description = "Proxmox subscription utilitites" exclude.workspace = true [dependencies] -anyhow = "1.0" -base64 = "0.13" -hex = "0.4" -lazy_static = "1.4" -openssl = "0.10" +anyhow.workspace = true +base64.workspace = true +hex.workspace = true +lazy_static.workspace = true +openssl.workspace = true regex = "1.5" -serde = "1.0" -serde_json = "1.0" +serde.workspace = true +serde_json.workspace = true proxmox-http = { path = "../proxmox-http", version = "0.7", default_features = false, features = ["client-trait", "http-helpers"] } proxmox-serde = { path = "../proxmox-serde", version = "0.1.1", features = ["serde_json"]} diff --git a/proxmox-sys/Cargo.toml b/proxmox-sys/Cargo.toml index d38f267a..66d068b8 100644 --- a/proxmox-sys/Cargo.toml +++ b/proxmox-sys/Cargo.toml @@ -10,16 +10,16 @@ description = "System tools (using nix)." exclude.workspace = true [dependencies] -anyhow = "1.0" -base64 = "0.13" -lazy_static = "1.4" -libc = "0.2.107" -log = "0.4.17" -nix = "0.24.1" +anyhow.workspace = true +base64.workspace = true +lazy_static.workspace = true +libc.workspace = true +log.workspace = true +nix.workspace = true regex = "1.2" -serde_json = "1.0" -serde = { version = "1.0", features = [ "derive" ] } -zstd = { version = "0.6", features = [ "bindgen" ], optional = true} +serde_json.workspace = true +serde = { workspace = true, features = [ "derive" ] } +zstd = { workspace = true, optional = true} # Macro crates: proxmox-sortable-macro = { path = "../proxmox-sortable-macro", optional = true, version = "0.1.2" } diff --git a/proxmox-tfa/Cargo.toml b/proxmox-tfa/Cargo.toml index e6d781e3..eba2a1e9 100644 --- a/proxmox-tfa/Cargo.toml +++ b/proxmox-tfa/Cargo.toml @@ -10,17 +10,17 @@ description = "tfa implementation for totp and u2f" exclude.workspace = true [dependencies] -anyhow = "1.0" +anyhow.workspace = true base32 = "0.4" -base64 = "0.13" -hex = "0.4" -openssl = "0.10" -percent-encoding = "2.1" -serde = "1.0" +base64.workspace = true +hex.workspace = true +openssl.workspace = true +percent-encoding.workspace = true +serde.workspace = true serde_plain = "1.0" -serde_json = { version = "1.0", optional = true } -libc = { version = "0.2", optional = true } -url = "2.2" +serde_json = { workspace = true, optional = true } +libc = { workspace = true, optional = true } +url.workspace = true proxmox-schema = { version = "1", path = "../proxmox-schema", features = [ "api-macro" ], optional = true } proxmox-time = { version = "1", path = "../proxmox-time", optional = true } diff --git a/proxmox-time/Cargo.toml b/proxmox-time/Cargo.toml index 59ff86eb..963d841f 100644 --- a/proxmox-time/Cargo.toml +++ b/proxmox-time/Cargo.toml @@ -10,13 +10,13 @@ description = "time utilities and TmEditor" exclude.workspace = true [dependencies] -anyhow = "1.0" +anyhow.workspace = true bitflags = "1.2.1" -lazy_static = "1.4" +lazy_static.workspace = true nom = "7" [target.'cfg(not(target_arch="wasm32"))'.dependencies] -libc = { version = "0.2", features = [ "extra_traits" ] } +libc = { workspace = true, features = [ "extra_traits" ] } [target.'cfg(target_arch="wasm32")'.dependencies] js-sys = "0.3.55" diff --git a/proxmox-uuid/Cargo.toml b/proxmox-uuid/Cargo.toml index c81df384..f07071e2 100644 --- a/proxmox-uuid/Cargo.toml +++ b/proxmox-uuid/Cargo.toml @@ -10,15 +10,15 @@ description = "bindings for libuuid with optional serde support" exclude.workspace = true [dependencies] -libc = "0.2" -serde = { version = "1.0", optional = true } +libc.workspace = true +serde = { workspace = true, optional = true } [features] default = [] [dev-dependencies] -serde = "1.0" -serde_json = "1.0" +serde.workspace = true +serde_json.workspace = true [target.'cfg(target_arch="wasm32")'.dependencies] js-sys = "0.3.55"