From 833cf082dac0b8296ba4b41935e15196b5210abe Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 7 May 2023 00:51:31 +0200 Subject: Remove unnecessary/unused "timeago" features To decrease dependency bloat and binary size. --- src/garage/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/garage') diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 0cbdf890..c8f87560 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -33,7 +33,7 @@ garage_web = { version = "0.8.2", path = "../web" } backtrace = "0.3" bytes = "1.0" bytesize = "1.1" -timeago = "0.4" +timeago = { version = "0.4", default-features = false } parse_duration = "2.1" hex = "0.4" tracing = { version = "0.1" } -- cgit v1.2.3 From d2deee0b8bc22de5e8f1115f65a8a979b1beba18 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 7 May 2023 18:12:01 +0200 Subject: Declare garage crates using workspace.dependencies This will allow to really disable "sled" feature without declaring `default-features = false` in every Cargo.toml where garage_db and garage_model is used. See https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table --- src/garage/Cargo.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/garage') diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index c8f87560..9935ce10 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -21,14 +21,14 @@ path = "tests/lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_db = { version = "0.8.2", path = "../db" } -garage_api = { version = "0.8.2", path = "../api" } -garage_block = { version = "0.8.2", path = "../block" } -garage_model = { version = "0.8.2", path = "../model" } -garage_rpc = { version = "0.8.2", path = "../rpc" } -garage_table = { version = "0.8.2", path = "../table" } -garage_util = { version = "0.8.2", path = "../util" } -garage_web = { version = "0.8.2", path = "../web" } +garage_db.workspace = true +garage_api.workspace = true +garage_block.workspace = true +garage_model.workspace = true +garage_rpc.workspace = true +garage_table.workspace = true +garage_util.workspace = true +garage_web.workspace = true backtrace = "0.3" bytes = "1.0" -- cgit v1.2.3 From 9e0a9c1c15cc8a6849de8c23bc1b0e711ab4fc8f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 3 May 2023 16:43:08 +0200 Subject: move git-version dependency to main crate to reduce rebuilds --- src/garage/Cargo.toml | 1 + src/garage/main.rs | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'src/garage') diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 9935ce10..2b366ff1 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -41,6 +41,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] } rand = "0.8" async-trait = "0.1.7" sodiumoxide = { version = "0.2.5-0", package = "kuska-sodiumoxide" } +git-version = "0.3.4" serde = { version = "1.0", default-features = false, features = ["derive", "rc"] } serde_bytes = "0.11" diff --git a/src/garage/main.rs b/src/garage/main.rs index 1ab18bb2..e8aee892 100644 --- a/src/garage/main.rs +++ b/src/garage/main.rs @@ -108,6 +108,12 @@ async fn main() { ][..]; if let Some(git_version) = option_env!("GIT_VERSION") { garage_util::version::init_version(git_version); + } else { + garage_util::version::init_version(git_version::git_version!( + prefix = "git:", + cargo_prefix = "cargo:", + fallback = "unknown" + )); } garage_util::version::init_features(features); -- cgit v1.2.3