From 05368e84fabb0fa5d2995741de87374812ae501c Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Sun, 25 May 2025 18:48:18 +0200 Subject: [PATCH] cargo: Make schemars a workspace dependency The `schemars` crate is a dependency of multiple workspace crates in the same version. Its version number is repeated multiple times in the respective `*/Cargo.toml` files. This requires more maintenance effort and risks versions drifting. As long as all crates depend on the same version, it makes more sense to have `schemars` as a workspace dependency. See: --- Cargo.toml | 3 +++ radicle-cli/Cargo.toml | 2 +- radicle/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cb166291..d2b90c2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,9 @@ version = "0.9.0" # for the day it makes a difference… rust-version = "1.81.0" +[workspace.dependencies] +schemars = { version = "1.0.0-alpha.17" } + [workspace.lints] clippy.type_complexity = "allow" clippy.enum_variant_names = "allow" diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index 9cec310a..6315dfd5 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -46,7 +46,7 @@ tree-sitter-bash = { version = "0.23.3" } tree-sitter-go = { version = "0.23.4" } tree-sitter-md = { version = "0.3.2" } zeroize = { version = "1.1" } -schemars = { version = "1.0.0-alpha.17" } +schemars = { workspace = true } [dependencies.radicle] version = "0.15" diff --git a/radicle/Cargo.toml b/radicle/Cargo.toml index 4af44aac..e5f3a6a0 100644 --- a/radicle/Cargo.toml +++ b/radicle/Cargo.toml @@ -35,7 +35,7 @@ sqlite = { version = "0.32.0", features = ["bundled"] } tempfile = { version = "3.3.0" } thiserror = { version = "1" } unicode-normalization = { version = "0.1" } -schemars = { version = "1.0.0-alpha.17", optional = true } +schemars = { workspace = true, optional = true } [dependencies.chrono] version = "0.4.0"