From 398ddb13003729a06a499a8b4e8984131d10d7a8 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 16 Dec 2021 13:21:52 +0100 Subject: [PATCH] Version 0.5.1 for publication to crates.io --- Cargo.lock | 14 ++++---- Cargo.nix | 82 +++++++++++++++++++++---------------------- src/api/Cargo.toml | 8 ++--- src/garage/Cargo.toml | 14 ++++---- src/model/Cargo.toml | 8 ++--- src/rpc/Cargo.toml | 4 +-- src/table/Cargo.toml | 6 ++-- src/util/Cargo.toml | 2 +- src/util/crdt/lww.rs | 10 ++++++ src/web/Cargo.toml | 10 +++--- 10 files changed, 84 insertions(+), 74 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c07acac2..3ccd6312 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -382,7 +382,7 @@ dependencies = [ [[package]] name = "garage" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "bytes 1.1.0", @@ -411,7 +411,7 @@ dependencies = [ [[package]] name = "garage_api" -version = "0.5.0" +version = "0.5.1" dependencies = [ "base64", "bytes 1.1.0", @@ -443,7 +443,7 @@ dependencies = [ [[package]] name = "garage_model" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "async-trait", @@ -466,7 +466,7 @@ dependencies = [ [[package]] name = "garage_rpc" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "async-trait", @@ -491,7 +491,7 @@ dependencies = [ [[package]] name = "garage_table" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "bytes 1.1.0", @@ -511,7 +511,7 @@ dependencies = [ [[package]] name = "garage_util" -version = "0.5.0" +version = "0.5.1" dependencies = [ "blake2", "chrono", @@ -535,7 +535,7 @@ dependencies = [ [[package]] name = "garage_web" -version = "0.5.0" +version = "0.5.1" dependencies = [ "err-derive 0.3.0", "futures", diff --git a/Cargo.nix b/Cargo.nix index 5b38c55e..a04bcb7e 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -40,13 +40,13 @@ in { cargo2nixVersion = "0.9.0"; workspace = { - garage_util = rustPackages.unknown.garage_util."0.5.0"; - garage_rpc = rustPackages.unknown.garage_rpc."0.5.0"; - garage_table = rustPackages.unknown.garage_table."0.5.0"; - garage_model = rustPackages.unknown.garage_model."0.5.0"; - garage_api = rustPackages.unknown.garage_api."0.5.0"; - garage_web = rustPackages.unknown.garage_web."0.5.0"; - garage = rustPackages.unknown.garage."0.5.0"; + garage_util = rustPackages.unknown.garage_util."0.5.1"; + garage_rpc = rustPackages.unknown.garage_rpc."0.5.1"; + garage_table = rustPackages.unknown.garage_table."0.5.1"; + garage_model = rustPackages.unknown.garage_model."0.5.1"; + garage_api = rustPackages.unknown.garage_api."0.5.1"; + garage_web = rustPackages.unknown.garage_web."0.5.1"; + garage = rustPackages.unknown.garage."0.5.1"; }; "registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.18" = overridableMkRustCrate (profileName: rec { name = "aho-corasick"; @@ -253,7 +253,7 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469"; }; dependencies = { - ${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "linux" || hostPlatform.config == "aarch64-apple-darwin" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.103" { inherit profileName; }; + ${ if hostPlatform.config == "aarch64-apple-darwin" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.103" { inherit profileName; }; }; }); @@ -613,9 +613,9 @@ in }; }); - "unknown".garage."0.5.0" = overridableMkRustCrate (profileName: rec { + "unknown".garage."0.5.1" = overridableMkRustCrate (profileName: rec { name = "garage"; - version = "0.5.0"; + version = "0.5.1"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/src/garage"); dependencies = { @@ -623,12 +623,12 @@ in bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.1.0" { inherit profileName; }; futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; }; futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; }; - garage_api = rustPackages."unknown".garage_api."0.5.0" { inherit profileName; }; - garage_model = rustPackages."unknown".garage_model."0.5.0" { inherit profileName; }; - garage_rpc = rustPackages."unknown".garage_rpc."0.5.0" { inherit profileName; }; - garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; }; - garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; }; - garage_web = rustPackages."unknown".garage_web."0.5.0" { inherit profileName; }; + garage_api = rustPackages."unknown".garage_api."0.5.1" { inherit profileName; }; + garage_model = rustPackages."unknown".garage_model."0.5.1" { inherit profileName; }; + garage_rpc = rustPackages."unknown".garage_rpc."0.5.1" { inherit profileName; }; + garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; }; + garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; }; + garage_web = rustPackages."unknown".garage_web."0.5.1" { inherit profileName; }; git_version = rustPackages."registry+https://github.com/rust-lang/crates.io-index".git-version."0.3.5" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; sodiumoxide = rustPackages."registry+https://github.com/rust-lang/crates.io-index".kuska-sodiumoxide."0.2.5-0" { inherit profileName; }; @@ -645,9 +645,9 @@ in }; }); - "unknown".garage_api."0.5.0" = overridableMkRustCrate (profileName: rec { + "unknown".garage_api."0.5.1" = overridableMkRustCrate (profileName: rec { name = "garage_api"; - version = "0.5.0"; + version = "0.5.1"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/src/api"); dependencies = { @@ -658,9 +658,9 @@ in err_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.0" { profileName = "__noProfile"; }; futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; }; futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; }; - garage_model = rustPackages."unknown".garage_model."0.5.0" { inherit profileName; }; - garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; }; - garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; }; + garage_model = rustPackages."unknown".garage_model."0.5.1" { inherit profileName; }; + garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; }; + garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; hmac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.10.1" { inherit profileName; }; http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.5" { inherit profileName; }; @@ -680,9 +680,9 @@ in }; }); - "unknown".garage_model."0.5.0" = overridableMkRustCrate (profileName: rec { + "unknown".garage_model."0.5.1" = overridableMkRustCrate (profileName: rec { name = "garage_model"; - version = "0.5.0"; + version = "0.5.1"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/src/model"); dependencies = { @@ -690,9 +690,9 @@ in async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.51" { profileName = "__noProfile"; }; futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; }; futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; }; - garage_rpc = rustPackages."unknown".garage_rpc."0.5.0" { inherit profileName; }; - garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; }; - garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; }; + garage_rpc = rustPackages."unknown".garage_rpc."0.5.1" { inherit profileName; }; + garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; }; + garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.14" { inherit profileName; }; netapp = rustPackages."registry+https://github.com/rust-lang/crates.io-index".netapp."0.3.0" { inherit profileName; }; @@ -706,9 +706,9 @@ in }; }); - "unknown".garage_rpc."0.5.0" = overridableMkRustCrate (profileName: rec { + "unknown".garage_rpc."0.5.1" = overridableMkRustCrate (profileName: rec { name = "garage_rpc"; - version = "0.5.0"; + version = "0.5.1"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/src/rpc"); dependencies = { @@ -717,7 +717,7 @@ in bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.1.0" { inherit profileName; }; futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; }; futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; }; - garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; }; + garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; }; gethostname = rustPackages."registry+https://github.com/rust-lang/crates.io-index".gethostname."0.2.1" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.13" { inherit profileName; }; @@ -734,9 +734,9 @@ in }; }); - "unknown".garage_table."0.5.0" = overridableMkRustCrate (profileName: rec { + "unknown".garage_table."0.5.1" = overridableMkRustCrate (profileName: rec { name = "garage_table"; - version = "0.5.0"; + version = "0.5.1"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/src/table"); dependencies = { @@ -744,8 +744,8 @@ in bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.1.0" { inherit profileName; }; futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; }; futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.17" { inherit profileName; }; - garage_rpc = rustPackages."unknown".garage_rpc."0.5.0" { inherit profileName; }; - garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; }; + garage_rpc = rustPackages."unknown".garage_rpc."0.5.1" { inherit profileName; }; + garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; }; hexdump = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hexdump."0.1.1" { inherit profileName; }; log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.14" { inherit profileName; }; rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.4" { inherit profileName; }; @@ -757,9 +757,9 @@ in }; }); - "unknown".garage_util."0.5.0" = overridableMkRustCrate (profileName: rec { + "unknown".garage_util."0.5.1" = overridableMkRustCrate (profileName: rec { name = "garage_util"; - version = "0.5.0"; + version = "0.5.1"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/src/util"); dependencies = { @@ -784,18 +784,18 @@ in }; }); - "unknown".garage_web."0.5.0" = overridableMkRustCrate (profileName: rec { + "unknown".garage_web."0.5.1" = overridableMkRustCrate (profileName: rec { name = "garage_web"; - version = "0.5.0"; + version = "0.5.1"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/src/web"); dependencies = { err_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.0" { profileName = "__noProfile"; }; futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.17" { inherit profileName; }; - garage_api = rustPackages."unknown".garage_api."0.5.0" { inherit profileName; }; - garage_model = rustPackages."unknown".garage_model."0.5.0" { inherit profileName; }; - garage_table = rustPackages."unknown".garage_table."0.5.0" { inherit profileName; }; - garage_util = rustPackages."unknown".garage_util."0.5.0" { inherit profileName; }; + garage_api = rustPackages."unknown".garage_api."0.5.1" { inherit profileName; }; + garage_model = rustPackages."unknown".garage_model."0.5.1" { inherit profileName; }; + garage_table = rustPackages."unknown".garage_table."0.5.1" { inherit profileName; }; + garage_util = rustPackages."unknown".garage_util."0.5.1" { inherit profileName; }; http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.5" { inherit profileName; }; hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.13" { inherit profileName; }; log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.14" { inherit profileName; }; diff --git a/src/api/Cargo.toml b/src/api/Cargo.toml index 3ca46764..9b87ae4a 100644 --- a/src/api/Cargo.toml +++ b/src/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_api" -version = "0.5.0" +version = "0.5.1" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -14,9 +14,9 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_model = { version = "0.5.0", path = "../model" } -garage_table = { version = "0.5.0", path = "../table" } -garage_util = { version = "0.5.0", path = "../util" } +garage_model = { version = "0.5.1", path = "../model" } +garage_table = { version = "0.5.1", path = "../table" } +garage_util = { version = "0.5.1", path = "../util" } base64 = "0.13" bytes = "1.0" diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 74a6ab0e..1db7c215 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage" -version = "0.5.0" +version = "0.5.1" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -15,12 +15,12 @@ path = "main.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_api = { version = "0.5.0", path = "../api" } -garage_model = { version = "0.5.0", path = "../model" } -garage_rpc = { version = "0.5.0", path = "../rpc" } -garage_table = { version = "0.5.0", path = "../table" } -garage_util = { version = "0.5.0", path = "../util" } -garage_web = { version = "0.5.0", path = "../web" } +garage_api = { version = "0.5.1", path = "../api" } +garage_model = { version = "0.5.1", path = "../model" } +garage_rpc = { version = "0.5.1", path = "../rpc" } +garage_table = { version = "0.5.1", path = "../table" } +garage_util = { version = "0.5.1", path = "../util" } +garage_web = { version = "0.5.1", path = "../web" } bytes = "1.0" git-version = "0.3.4" diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 1d695192..005fb13e 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_model" -version = "0.5.0" +version = "0.5.1" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -14,9 +14,9 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_rpc = { version = "0.5.0", path = "../rpc" } -garage_table = { version = "0.5.0", path = "../table" } -garage_util = { version = "0.5.0", path = "../util" } +garage_rpc = { version = "0.5.1", path = "../rpc" } +garage_table = { version = "0.5.1", path = "../table" } +garage_util = { version = "0.5.1", path = "../util" } async-trait = "0.1.7" arc-swap = "1.0" diff --git a/src/rpc/Cargo.toml b/src/rpc/Cargo.toml index d8ebb71e..79029ece 100644 --- a/src/rpc/Cargo.toml +++ b/src/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_rpc" -version = "0.5.0" +version = "0.5.1" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -14,7 +14,7 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_util = { version = "0.5.0", path = "../util" } +garage_util = { version = "0.5.1", path = "../util" } arc-swap = "1.0" bytes = "1.0" diff --git a/src/table/Cargo.toml b/src/table/Cargo.toml index dc37f12c..82f602da 100644 --- a/src/table/Cargo.toml +++ b/src/table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_table" -version = "0.5.0" +version = "0.5.1" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -14,8 +14,8 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_rpc = { version = "0.5.0", path = "../rpc" } -garage_util = { version = "0.5.0", path = "../util" } +garage_rpc = { version = "0.5.1", path = "../rpc" } +garage_util = { version = "0.5.1", path = "../util" } async-trait = "0.1.7" bytes = "1.0" diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index e33f8a66..d7333161 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_util" -version = "0.5.0" +version = "0.5.1" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" diff --git a/src/util/crdt/lww.rs b/src/util/crdt/lww.rs index 43d13f27..6990b865 100644 --- a/src/util/crdt/lww.rs +++ b/src/util/crdt/lww.rs @@ -77,11 +77,21 @@ where self.v = new_value; } + /// Get the timestamp currently associated with the value + pub fn timestamp(&self) -> u64 { + self.ts + } + /// Get the CRDT value pub fn get(&self) -> &T { &self.v } + /// Take the CRDT value + pub fn take(self) -> T { + self.v + } + /// Get a mutable reference to the CRDT's value /// /// This is usefull to mutate the inside value without changing the LWW timestamp. diff --git a/src/web/Cargo.toml b/src/web/Cargo.toml index 72701c90..b2502b48 100644 --- a/src/web/Cargo.toml +++ b/src/web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_web" -version = "0.5.0" +version = "0.5.1" authors = ["Alex Auvolat ", "Quentin Dufour "] edition = "2018" license = "AGPL-3.0" @@ -14,10 +14,10 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_api = { version = "0.5.0", path = "../api" } -garage_model = { version = "0.5.0", path = "../model" } -garage_util = { version = "0.5.0", path = "../util" } -garage_table = { version = "0.5.0", path = "../table" } +garage_api = { version = "0.5.1", path = "../api" } +garage_model = { version = "0.5.1", path = "../model" } +garage_util = { version = "0.5.1", path = "../util" } +garage_table = { version = "0.5.1", path = "../table" } err-derive = "0.3" log = "0.4"