mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-06 00:23:08 +02:00
Unify crates dependency management in project's Cargo.toml using workspace dependencies.
This simplifies dependencies management and upgrades while ensuring that dependencies version aligned with all the crates in the project and neither dependency is used twice with different versions by accident (though dependencies still can appear several times as sub-dependencies due to misaligned version constraints for dependency resolution). Documentation and useful articles: - https://mainmatter.com/blog/2024/03/18/cargo-autoinherit/ - https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace - https://crates.io/crates/cargo-autoinherit Commands: `cargo autoinherit` Output: $ cargo autoinherit `multipart` won't be auto-inherited because there are multiple sources for it: - version: ^0.18.0 - version: ^0 `sequoia-openpgp` won't be auto-inherited because there are multiple sources for it: - version: ^1.17.0 - version: =1.17.0 Changes: - Collect all the dependencies for workspace's crates in the top level Cargo.toml file by applying `cargo autoinherit`. - Use workspace dependencies in crates Cargo.toml files (i.e. crate_name = { workspace = true }).
This commit is contained in:
102
Cargo.toml
102
Cargo.toml
@@ -15,49 +15,89 @@ members = [
|
||||
"tester",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
hagrid-database = { path = "database" }
|
||||
chrono = "0.4"
|
||||
[workspace.dependencies]
|
||||
anyhow = "1"
|
||||
rocket = { version = "0.5", features = [ "json" ] }
|
||||
rocket_dyn_templates = { version = "0.1", features = ["handlebars"] }
|
||||
rocket_codegen = "0.5"
|
||||
sequoia-openpgp = { version = "=1.17.0", default-features = false, features = ["crypto-openssl"] }
|
||||
multipart = "0.18.0"
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
time = "0.1"
|
||||
tempfile = "3"
|
||||
structopt = "0.2"
|
||||
url = "1"
|
||||
num_cpus = "1"
|
||||
hagrid-database = { path = "database" }
|
||||
aes-gcm = "0.10"
|
||||
sha2 = "0.10"
|
||||
base64 = "0.10"
|
||||
uuid = { version = "0.7", features = [ "v4" ] }
|
||||
rocket_prometheus = "0.10"
|
||||
lazy_static = "1"
|
||||
chrono = "0.4"
|
||||
clap = "2"
|
||||
fs2 = "0.4"
|
||||
gettext = "0.4"
|
||||
gettext-macros = "0.6"
|
||||
gettext-utils = "0.1"
|
||||
gettext = "0.4"
|
||||
glob = "0.3"
|
||||
hex = "0.3"
|
||||
hyperx = "1.4"
|
||||
# this is a slightly annoying update, so keeping this back for now
|
||||
lettre = { version = "=0.10.0-rc.5", default-features = false, features = ["builder", "file-transport", "sendmail-transport", "smtp-transport"] }
|
||||
idna = "0.1"
|
||||
indicatif = "0.11"
|
||||
lazy_static = "1"
|
||||
lettre = { version = "=0.10.0-rc.5", default-features = false }
|
||||
log = "0"
|
||||
num_cpus = "1"
|
||||
pathdiff = "0.1"
|
||||
r2d2 = "0.8"
|
||||
r2d2_sqlite = "0.24"
|
||||
rand = "0.6"
|
||||
regex = "1"
|
||||
rocket = "0.5"
|
||||
rocket_codegen = "0.5"
|
||||
rocket_dyn_templates = "0.1"
|
||||
rocket_i18n = { git = "https://github.com/Valodim/rocket_i18n", branch = "go-async", default-features = false }
|
||||
rocket_prometheus = "0.10"
|
||||
rusqlite = "0.31"
|
||||
self_cell = "1"
|
||||
serde = "1.0"
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
sha2 = "0.10"
|
||||
structopt = "0.2"
|
||||
tempfile = "3"
|
||||
time = "0.1"
|
||||
toml = "0.5"
|
||||
url = "1"
|
||||
uuid = "0.7"
|
||||
vergen = "3"
|
||||
walkdir = "2"
|
||||
zbase32 = "0.1"
|
||||
|
||||
[dependencies.rocket_i18n]
|
||||
# git = "https://github.com/Plume-org/rocket_i18n"
|
||||
git = "https://github.com/Valodim/rocket_i18n"
|
||||
branch = "go-async"
|
||||
default-features = false
|
||||
features = ["rocket"]
|
||||
[dependencies]
|
||||
hagrid-database = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
rocket = { workspace = true, features = ["json"] }
|
||||
rocket_dyn_templates = { workspace = true, features = ["handlebars"] }
|
||||
rocket_codegen = { workspace = true }
|
||||
sequoia-openpgp = { version = "=1.17.0", default-features = false, features = ["crypto-openssl"] }
|
||||
multipart = "0.18.0"
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
time = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
structopt = { workspace = true }
|
||||
url = { workspace = true }
|
||||
num_cpus = { workspace = true }
|
||||
aes-gcm = { workspace = true }
|
||||
sha2 = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4"] }
|
||||
rocket_prometheus = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
gettext-macros = { workspace = true }
|
||||
gettext-utils = { workspace = true }
|
||||
gettext = { workspace = true }
|
||||
glob = { workspace = true }
|
||||
hyperx = { workspace = true }
|
||||
# this is a slightly annoying update, so keeping this back for now
|
||||
lettre = { workspace = true, features = ["builder", "file-transport", "sendmail-transport", "smtp-transport"] }
|
||||
rocket_i18n= { workspace = true, features = ["rocket"] }
|
||||
|
||||
[build-dependencies]
|
||||
vergen = "3"
|
||||
vergen = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
regex = "1"
|
||||
regex = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "hagrid"
|
||||
|
@@ -5,28 +5,28 @@ authors = ["Kai Michaelis <kai@sequoia-pgp.org>"]
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
anyhow = { workspace = true }
|
||||
sequoia-openpgp = { version = "=1.17.0", default-features = false, features = ["crypto-openssl"] }
|
||||
log = "0"
|
||||
rand = "0.6"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
time = "0.1"
|
||||
tempfile = "3"
|
||||
url = "1"
|
||||
hex = "0.3"
|
||||
base64 = "0.10"
|
||||
pathdiff = "0.1"
|
||||
idna = "0.1"
|
||||
fs2 = "0.4"
|
||||
walkdir = "2"
|
||||
chrono = "0.4"
|
||||
zbase32 = "0.1"
|
||||
r2d2 = "0.8"
|
||||
r2d2_sqlite = "0.24"
|
||||
rusqlite = { version = "0.31", features = ["trace"] }
|
||||
self_cell = "1"
|
||||
log = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
time = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
url = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
pathdiff = { workspace = true }
|
||||
idna = { workspace = true }
|
||||
fs2 = { workspace = true }
|
||||
walkdir = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
zbase32 = { workspace = true }
|
||||
r2d2 = { workspace = true }
|
||||
r2d2_sqlite = { workspace = true }
|
||||
rusqlite = { workspace = true, features = ["trace"] }
|
||||
self_cell = { workspace = true }
|
||||
|
||||
[lib]
|
||||
name = "hagrid_database"
|
||||
|
@@ -5,24 +5,24 @@ authors = ["Vincent Breitmoser <look@my.amazin.horse>"]
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
hagrid-database = { path = "../database" }
|
||||
anyhow = "1"
|
||||
hagrid-database = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
sequoia-openpgp = { version = "1.17.0", default-features = false, features = ["crypto-openssl"] }
|
||||
multipart = "0"
|
||||
log = "0"
|
||||
rand = "0.6"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
time = "0.1"
|
||||
tempfile = "3"
|
||||
url = "1"
|
||||
hex = "0.3"
|
||||
base64 = "0.10"
|
||||
pathdiff = "0.1"
|
||||
idna = "0.1"
|
||||
fs2 = "0.4"
|
||||
walkdir = "2"
|
||||
clap = "2"
|
||||
toml = "0.5"
|
||||
indicatif = "0.11"
|
||||
log = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
time = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
url = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
pathdiff = { workspace = true }
|
||||
idna = { workspace = true }
|
||||
fs2 = { workspace = true }
|
||||
walkdir = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
indicatif = { workspace = true }
|
||||
|
@@ -5,18 +5,18 @@ authors = ["Vincent Breitmoser <look@my.amazin.horse>"]
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
anyhow = { workspace = true }
|
||||
sequoia-openpgp = { version = "1", default-features = false, features = ["crypto-openssl"] }
|
||||
log = "0"
|
||||
rand = "0.6"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
time = "0.1"
|
||||
url = "1"
|
||||
hex = "0.3"
|
||||
base64 = "0.10"
|
||||
idna = "0.1"
|
||||
fs2 = "0.4"
|
||||
clap = "2"
|
||||
indicatif = "0.11"
|
||||
log = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
time = { workspace = true }
|
||||
url = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
idna = { workspace = true }
|
||||
fs2 = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
indicatif = { workspace = true }
|
||||
|
Reference in New Issue
Block a user