From 05c9e1927e70deabbe2a929d321be57c8744f667 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Mar 2024 17:15:28 +0100 Subject: [PATCH 001/150] Allow dependency names that start with a number It was possible to declare and build packages where the package name starts with a digit but it wasn't possible to declare them as dependencies of another package. This fixes #356 and I'm also adding a test for it to avoid regressions. Now we could package `0ad`, `389-ds`, `6tunnel`, `7z`, `9pfs`, etc. \o/ Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 75e97e90..4303a706 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -36,7 +36,7 @@ pub trait ParseDependency { lazy_static! { pub(in crate::package::dependency) static ref DEPENDENCY_PARSING_RE: Regex = - Regex::new("^(?P[[:alpha:]]([[[:alnum:]]\\.\\-_])*) (?P([\\*=><])?[[:alnum:]]([[[:alnum:]][[:punct:]]])*)$").unwrap(); + Regex::new("^(?P[[:alnum:]]([[[:alnum:]]\\.\\-_])*) (?P([\\*=><])?[[:alnum:]]([[[:alnum:]][[:punct:]]])*)$").unwrap(); } /// Helper function for the actual implementation of the ParseDependency trait. @@ -137,4 +137,18 @@ mod tests { PackageVersionConstraint::from_version(String::from("="), exact("0.123")) ); } + + #[test] + fn test_dependency_string_where_pkg_starts_with_number() { + let s = "7z =42"; + let d = Dependency::from(String::from(s)); + + let (n, c) = d.parse_as_name_and_version().unwrap(); + + assert_eq!(n, name("7z")); + assert_eq!( + c, + PackageVersionConstraint::from_version(String::from("="), exact("42")) + ); + } } From 4087b2183b3688d193d3dafe0d09c6d8ff9350a8 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Mar 2024 18:10:14 +0100 Subject: [PATCH 002/150] Deduplicate the code for the dependency parsing tests Let's avoid copy-pasted code :) Using assertion macros in helper functions isn't ideal but the error messages should contain enough context to figure out what went wrong. Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 69 ++++++++++++----------------------- 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 4303a706..22ec418a 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -84,12 +84,27 @@ mod tests { // helper functions // - fn name(s: &'static str) -> PackageName { - PackageName::from(String::from(s)) - } + fn dep_parse_test(name: &'static str, version: &'static str) { + let name = name.to_string(); + let version = version.to_string(); + + let dependency_specification = format!("{name} ={version}"); + let dep = Dependency::from(dependency_specification.clone()); + let (dep_name, dep_version_constraint) = dep.parse_as_name_and_version().unwrap(); - fn exact(s: &'static str) -> PackageVersion { - PackageVersion::from(String::from(s)) + let version_constraint = PackageVersionConstraint::from_version( + String::from("="), + PackageVersion::from(version), + ); + assert_eq!( + dep_name, + PackageName::from(name), + "Name check failed for input: {dependency_specification}" + ); + assert_eq!( + dep_version_constraint, version_constraint, + "Version constraint check failed for input: {dependency_specification}" + ); } // @@ -98,57 +113,21 @@ mod tests { #[test] fn test_dependency_conversion_1() { - let s = "vim =8.2"; - let d = Dependency::from(String::from(s)); - - let (n, c) = d.parse_as_name_and_version().unwrap(); - - assert_eq!(n, name("vim")); - assert_eq!( - c, - PackageVersionConstraint::from_version(String::from("="), exact("8.2")) - ); + dep_parse_test("vim", "8.2"); } #[test] fn test_dependency_conversion_2() { - let s = "gtk15 =1b"; - let d = Dependency::from(String::from(s)); - - let (n, c) = d.parse_as_name_and_version().unwrap(); - - assert_eq!(n, name("gtk15")); - assert_eq!( - c, - PackageVersionConstraint::from_version(String::from("="), exact("1b")) - ); + dep_parse_test("gtk15", "1b"); } #[test] fn test_dependency_string_with_punctuation() { - let s = "foo-bar1.2.3 =0.123"; - let d = Dependency::from(String::from(s)); - - let (n, c) = d.parse_as_name_and_version().unwrap(); - - assert_eq!(n, name("foo-bar1.2.3")); - assert_eq!( - c, - PackageVersionConstraint::from_version(String::from("="), exact("0.123")) - ); + dep_parse_test("foo-bar1.2.3", "0.123"); } #[test] fn test_dependency_string_where_pkg_starts_with_number() { - let s = "7z =42"; - let d = Dependency::from(String::from(s)); - - let (n, c) = d.parse_as_name_and_version().unwrap(); - - assert_eq!(n, name("7z")); - assert_eq!( - c, - PackageVersionConstraint::from_version(String::from("="), exact("42")) - ); + dep_parse_test("7z", "42"); } } From aa8bbaf49dacbff5d9513eaea864028cc92d0995 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Mar 2024 18:48:26 +0100 Subject: [PATCH 003/150] Add more complex dependency parsing tests To avoid potentially unintended regressions when changing the regex. Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 22ec418a..009939e6 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -107,6 +107,15 @@ mod tests { ); } + fn dep_parse_expect_err(dependency_specification: &'static str) { + let dep = Dependency::from(dependency_specification.to_string()); + let result = dep.parse_as_name_and_version(); + assert!( + result.is_err(), + "Should not be able to parse this input: {dependency_specification}" + ); + } + // // tests // @@ -130,4 +139,15 @@ mod tests { fn test_dependency_string_where_pkg_starts_with_number() { dep_parse_test("7z", "42"); } + + #[test] + fn test_complex_dependency_parsing() { + dep_parse_test("0ad_", "42"); + dep_parse_test("2048-cli_0.0", "42"); + + dep_parse_expect_err("0] =42"); + dep_parse_expect_err("a\\ =42"); + dep_parse_expect_err("a =.0"); + dep_parse_expect_err("a ="); + } } From bae6fd0aa5fc6786caa64380c6c4e61dff962a46 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Mar 2024 18:50:12 +0100 Subject: [PATCH 004/150] Simplify the dependency parsing regex (unnecessary parentheses) The parentheses aren't required here. They can still help with readability but in this case it might be better without them (the square brackets should be sufficient for a quick orientation) so I'll drop them. Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 009939e6..34f10018 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -36,7 +36,7 @@ pub trait ParseDependency { lazy_static! { pub(in crate::package::dependency) static ref DEPENDENCY_PARSING_RE: Regex = - Regex::new("^(?P[[:alnum:]]([[[:alnum:]]\\.\\-_])*) (?P([\\*=><])?[[:alnum:]]([[[:alnum:]][[:punct:]]])*)$").unwrap(); + Regex::new("^(?P[[:alnum:]][[[:alnum:]]\\.\\-_]*) (?P[\\*=><]?[[:alnum:]][[[:alnum:]][[:punct:]]]*)$").unwrap(); } /// Helper function for the actual implementation of the ParseDependency trait. From da79d45f55afca45302e65a6e4ce9ea00b2dbfa7 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Mar 2024 18:52:48 +0100 Subject: [PATCH 005/150] Simplify the dependency parsing regex (unnecessary square brackets) "Any named character class may appear inside a bracketed [...] character class. For example, [\p{Greek}[:digit:]]" [0] [0]: https://docs.rs/regex/1.10.3/regex/index.html#character-classes Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 34f10018..d8024427 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -36,7 +36,7 @@ pub trait ParseDependency { lazy_static! { pub(in crate::package::dependency) static ref DEPENDENCY_PARSING_RE: Regex = - Regex::new("^(?P[[:alnum:]][[[:alnum:]]\\.\\-_]*) (?P[\\*=><]?[[:alnum:]][[[:alnum:]][[:punct:]]]*)$").unwrap(); + Regex::new("^(?P[[:alnum:]][[:alnum:]\\.\\-_]*) (?P[\\*=><]?[[:alnum:]][[:alnum:][:punct:]]*)$").unwrap(); } /// Helper function for the actual implementation of the ParseDependency trait. From 120d41375551394bcebad4289910d439b12dce4a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Mar 2024 18:54:03 +0100 Subject: [PATCH 006/150] Simplify the dependency parsing regex (unnecessary escaping) The escaping shouldn't be required for "." and "*" inside a bracketed character class (`[...]`) and we can avoid it for "-" if we place it at the beginning or the end of the bracketed character class. The escaping was also a bit confusing as "\" had to be escaped with another backslash as it's a Rust string (raw strings would be better in this case). Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index d8024427..09a71b3d 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -36,7 +36,7 @@ pub trait ParseDependency { lazy_static! { pub(in crate::package::dependency) static ref DEPENDENCY_PARSING_RE: Regex = - Regex::new("^(?P[[:alnum:]][[:alnum:]\\.\\-_]*) (?P[\\*=><]?[[:alnum:]][[:alnum:][:punct:]]*)$").unwrap(); + Regex::new("^(?P[[:alnum:]][[:alnum:]._-]*) (?P[*=><]?[[:alnum:]][[:alnum:][:punct:]]*)$").unwrap(); } /// Helper function for the actual implementation of the ParseDependency trait. From b11c67722d7b87502da84bc03ad073e344620dcc Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Mar 2024 20:49:24 +0100 Subject: [PATCH 007/150] Add dependency parsing tests for unsupported version constraints The last three `dep_parse_expect_err()` examples match the regex but aren't supported by the version parsing yet (`a *` would also match the regex with an `[:alnum:]` at the end). Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 09a71b3d..89839abf 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -35,6 +35,11 @@ pub trait ParseDependency { } lazy_static! { + // The following regex could be simplified significantly since we basically only need the space + // (" ") for splitting name and version (and both shouldn't be empty) - the rest of the + // validation could and probably should be done when parsing `name` and `version` (can make the + // errors more precise and we avoid that the regex diverges from the rest of the validation as + // it's already the case): pub(in crate::package::dependency) static ref DEPENDENCY_PARSING_RE: Regex = Regex::new("^(?P[[:alnum:]][[:alnum:]._-]*) (?P[*=><]?[[:alnum:]][[:alnum:][:punct:]]*)$").unwrap(); } @@ -149,5 +154,12 @@ mod tests { dep_parse_expect_err("a\\ =42"); dep_parse_expect_err("a =.0"); dep_parse_expect_err("a ="); + dep_parse_expect_err(""); + dep_parse_expect_err(" "); + // Not supported yet: + dep_parse_expect_err("a *"); + dep_parse_expect_err("a >2"); + dep_parse_expect_err("a <2"); + dep_parse_expect_err("a 42"); } } From fa038d4c271831967644713aa7ede1dbd3e7be54 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Thu, 22 Feb 2024 11:46:51 +0100 Subject: [PATCH 008/150] Set a user agent header for GitHub API downloads Downloads from the GitHub API don't work without sending a user agent. Signed-off-by: Nico Steinle --- src/commands/source/download.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index d5d9025a..a261cbdb 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -8,6 +8,7 @@ // SPDX-License-Identifier: EPL-2.0 // +use std::concat; use std::convert::TryFrom; use std::path::PathBuf; use std::sync::Arc; @@ -30,6 +31,7 @@ use crate::source::*; use crate::util::progress::ProgressBars; const NUMBER_OF_MAX_CONCURRENT_DOWNLOADS: usize = 100; +const APP_USER_AGENT: &str = concat! {env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")}; /// A wrapper around the indicatif::ProgressBar /// @@ -116,8 +118,9 @@ async fn perform_download( ) -> Result<()> { trace!("Downloading: {:?}", source); - let client_builder = - reqwest::Client::builder().redirect(reqwest::redirect::Policy::limited(10)); + let client_builder = reqwest::Client::builder() + .user_agent(APP_USER_AGENT) + .redirect(reqwest::redirect::Policy::limited(10)); let client_builder = if let Some(to) = timeout { client_builder.timeout(std::time::Duration::from_secs(to)) From 87837e89053c51d17a574bc4d44f3bc367df40c9 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 6 Mar 2024 10:38:00 +0100 Subject: [PATCH 009/150] Avoid unnecessary warnings with older Clippy versions In 80e0101, I first added a rule for a new Clippy lint (introduced in 1.73.0) to fix our optional CI check that lints with the beta toolchain. This would break the required CI check against the MSRV so I decided to allow unknown lints for that check in ef29d94. However, this isn't ideal as it only applies to the CI checks and still shows the warnings when developing or rather linting locally. Luckily we can use the rustversion crate to make the Clippy lint overrides via attributes also depend on the Rust/toolchain version (this especially helps with cases like in 0556536 where the override is only required for a single toolchain version). It's just a bit unfortunate that I cannot use `stable(1.77)` since that really only applies to stable versions and `1.77` is currently still a beta version (so I have to combine `all`, `since`, and `before` to produce a `version(1.77)`). Signed-off-by: Michael Weiss --- .github/workflows/cargo.yml | 3 +-- src/package/package.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index e228f02a..f70c596c 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -101,7 +101,6 @@ jobs: include: - rust: 1.74.0 # MSRV optional: false - extra_opts: "-A unknown-lints" - rust: beta optional: true steps: @@ -114,7 +113,7 @@ jobs: with: shared-key: "ci" - name: cargo clippy - run: cargo clippy --all-targets -- -D warnings ${{ matrix.extra_opts }} + run: cargo clippy --all-targets -- -D warnings # This "accumulation" job is used as the required CI check for PRs. # We could require multiple jobs but the MSRV is subject to change and makes diff --git a/src/package/package.rs b/src/package/package.rs index 614762a1..50f5fe3b 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -223,7 +223,7 @@ impl<'a> std::fmt::Debug for DebugPackage<'a> { impl PartialEq for Package { // Ignore the following lint as it results in a false positive with clippy 0.1.77 // (TODO: drop this once we bump the MSRV to 1.78): - #[allow(clippy::unconditional_recursion)] + #[rustversion::attr(all(since(1.77), before(1.78)), allow(clippy::unconditional_recursion))] fn eq(&self, other: &Package) -> bool { (self.name(), self.version()).eq(&(other.name(), other.version())) } From 610a914a978ed9e4bc5af043323ee038753cb542 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 7 Mar 2024 08:55:56 +0100 Subject: [PATCH 010/150] Add optional tracing-chrome setup This patch adds an optional flag `--tracing-chrome` which enables the tracing-chrome backend for traces which then generates a chrome://tracing compatible file. Signed-off-by: Matthias Beyer --- Cargo.lock | 12 ++++++++++++ Cargo.toml | 1 + src/cli.rs | 7 +++++++ src/main.rs | 22 +++++++++++++++++----- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fd8efe1a..125509f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -259,6 +259,7 @@ dependencies = [ "tokio-stream", "toml 0.8.10", "tracing", + "tracing-chrome", "tracing-subscriber", "typed-builder", "unindent", @@ -2649,6 +2650,17 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "tracing-chrome" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "496b3cd5447f7ff527bbbf19b071ad542a000adf297d4127078b4dfdb931f41a" +dependencies = [ + "serde_json", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "tracing-core" version = "0.1.32" diff --git a/Cargo.toml b/Cargo.toml index a8e99752..55540cf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,6 +73,7 @@ tokio-stream = "0.1" toml = "0.8" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing-chrome = "0.7.1" typed-builder = "0.18" unindent = "0.2" url = { version = "2", features = ["serde"] } diff --git a/src/cli.rs b/src/cli.rs index b923393d..f3c9c300 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -69,6 +69,13 @@ pub fn cli() -> Command { .help("Detailed version output with build information") ) + .arg(Arg::new("tracing-chrome") + .action(ArgAction::SetTrue) + .required(false) + .long("tracing-chrome") + .help("Generate a chrome compatible trace file") + ) + .arg(Arg::new("hide_bars") .action(ArgAction::SetTrue) .required(false) diff --git a/src/main.rs b/src/main.rs index a0efb96a..e141301f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,6 +58,7 @@ use clap::ArgMatches; #[rustversion::since(1.76)] use result_inspect as _; use tracing::{debug, error}; +use tracing_subscriber::layer::SubscriberExt; mod cli; mod commands; @@ -98,17 +99,28 @@ async fn main() -> Result<()> { homepage: "atos.net/de/deutschland/sc".into(), }); - tracing_subscriber::fmt::fmt() + let app = cli::cli(); + let cli = app.get_matches(); + + let (chrome_layer, _guard) = match cli + .get_flag("tracing-chrome") + .then(|| tracing_chrome::ChromeLayerBuilder::new().build()) + { + Some((chrome_layer, guard)) => (Some(chrome_layer), Some(guard)), + _ => (None, None), + }; + + let subscriber = tracing_subscriber::fmt::fmt() .with_env_filter( tracing_subscriber::filter::EnvFilter::builder() .with_default_directive(tracing_subscriber::filter::LevelFilter::WARN.into()) .from_env_lossy(), ) - .init(); - debug!("Debugging enabled"); + .finish() + .with(chrome_layer); - let app = cli::cli(); - let cli = app.get_matches(); + tracing::subscriber::set_global_default(subscriber)?; + debug!("Debugging enabled"); // check if the version flag is set if cli.get_flag("version") { From a0dcb39931cb7626663ed28b2a3aad533f203bae Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 2 Apr 2024 15:09:31 +0200 Subject: [PATCH 011/150] Drop the unused package::dependency::StringEqual trait A newer version of the Rust toolchain (1.78) detected this unused code (`#[deny(dead_code)]` implied by `#[deny(unused)]`). It looks like the last usage of this trait/method was removed in 5410676. Signed-off-by: Michael Weiss --- src/package/dependency/build.rs | 10 ---------- src/package/dependency/mod.rs | 4 ---- src/package/dependency/runtime.rs | 10 ---------- 3 files changed, 24 deletions(-) diff --git a/src/package/dependency/build.rs b/src/package/dependency/build.rs index ad2440eb..ecb05f01 100644 --- a/src/package/dependency/build.rs +++ b/src/package/dependency/build.rs @@ -14,7 +14,6 @@ use serde::Serialize; use crate::package::dependency::condition::Condition; use crate::package::dependency::ParseDependency; -use crate::package::dependency::StringEqual; use crate::package::PackageName; use crate::package::PackageVersionConstraint; @@ -35,15 +34,6 @@ impl AsRef for BuildDependency { } } -impl StringEqual for BuildDependency { - fn str_equal(&self, s: &str) -> bool { - match self { - BuildDependency::Simple(name) => name == s, - BuildDependency::Conditional { name, .. } => name == s, - } - } -} - impl ParseDependency for BuildDependency { fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersionConstraint)> { crate::package::dependency::parse_package_dependency_string_into_name_and_version( diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 89839abf..5e12458d 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -26,10 +26,6 @@ pub use runtime::*; pub mod condition; -pub trait StringEqual { - fn str_equal(&self, s: &str) -> bool; -} - pub trait ParseDependency { fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersionConstraint)>; } diff --git a/src/package/dependency/runtime.rs b/src/package/dependency/runtime.rs index 75708acb..f0f80999 100644 --- a/src/package/dependency/runtime.rs +++ b/src/package/dependency/runtime.rs @@ -14,7 +14,6 @@ use serde::Serialize; use crate::package::dependency::condition::Condition; use crate::package::dependency::ParseDependency; -use crate::package::dependency::StringEqual; use crate::package::PackageName; use crate::package::PackageVersionConstraint; @@ -42,15 +41,6 @@ impl AsRef for Dependency { } } -impl StringEqual for Dependency { - fn str_equal(&self, s: &str) -> bool { - match self { - Dependency::Simple(name) => name == s, - Dependency::Conditional { name, .. } => name == s, - } - } -} - impl From for Dependency { fn from(s: String) -> Dependency { Dependency::Simple(s) From 0ce53f0c48da785c7661b699e06db76d1e805da6 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 2 Apr 2024 15:21:36 +0200 Subject: [PATCH 012/150] Remove redundant imports of std::convert::Try{From,Into} Those traits were added to the prelude in the Rust 2021 Edition: - https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html - https://doc.rust-lang.org/1.77.1/core/prelude/rust_2021/index.html A newer version of the Rust toolchain (1.78) detected these imports that are redundant since 91b246d6. Signed-off-by: Michael Weiss --- src/commands/env_of.rs | 2 -- src/commands/find_artifact.rs | 1 - src/commands/find_pkg.rs | 2 -- src/commands/lint.rs | 1 - src/commands/source/download.rs | 1 - src/commands/source/mod.rs | 1 - src/commands/tree_of.rs | 2 -- src/package/dependency/mod.rs | 2 -- src/package/version.rs | 4 ++-- src/repository/fs/path.rs | 1 - src/repository/fs/representation.rs | 2 -- 11 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/commands/env_of.rs b/src/commands/env_of.rs index 719eef77..7e7173a1 100644 --- a/src/commands/env_of.rs +++ b/src/commands/env_of.rs @@ -10,8 +10,6 @@ //! Implementation of the 'env-of' subcommand -use std::convert::TryFrom; - use anyhow::Result; use clap::ArgMatches; use tracing::trace; diff --git a/src/commands/find_artifact.rs b/src/commands/find_artifact.rs index 84b5a65e..a48b8a1d 100644 --- a/src/commands/find_artifact.rs +++ b/src/commands/find_artifact.rs @@ -10,7 +10,6 @@ //! Implementation of the 'find-artifact' subcommand -use std::convert::TryFrom; use std::io::Write; use std::path::PathBuf; use std::sync::Arc; diff --git a/src/commands/find_pkg.rs b/src/commands/find_pkg.rs index d5d03ec6..c998b4f1 100644 --- a/src/commands/find_pkg.rs +++ b/src/commands/find_pkg.rs @@ -10,8 +10,6 @@ //! Implementation of the 'find-pkg' subcommand -use std::convert::TryFrom; - use anyhow::Context; use anyhow::Result; use clap::ArgMatches; diff --git a/src/commands/lint.rs b/src/commands/lint.rs index 4976ce39..8d3463f5 100644 --- a/src/commands/lint.rs +++ b/src/commands/lint.rs @@ -10,7 +10,6 @@ //! Implementation of the 'lint' subcommand -use std::convert::TryFrom; use std::path::Path; use anyhow::anyhow; diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index a261cbdb..484a4fd0 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -9,7 +9,6 @@ // use std::concat; -use std::convert::TryFrom; use std::path::PathBuf; use std::sync::Arc; diff --git a/src/commands/source/mod.rs b/src/commands/source/mod.rs index 275a178c..6dba295d 100644 --- a/src/commands/source/mod.rs +++ b/src/commands/source/mod.rs @@ -10,7 +10,6 @@ //! Implementation of the 'source' subcommand -use std::convert::TryFrom; use std::io::Write; use std::path::PathBuf; diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index 81a04b9d..67541532 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -10,8 +10,6 @@ //! Implementation of the 'tree-of' subcommand -use std::convert::TryFrom; - use anyhow::Error; use anyhow::Result; use clap::ArgMatches; diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 5e12458d..7faacf7c 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -8,8 +8,6 @@ // SPDX-License-Identifier: EPL-2.0 // -use std::convert::TryFrom; - use anyhow::anyhow; use anyhow::Result; use lazy_static::lazy_static; diff --git a/src/package/version.rs b/src/package/version.rs index 87f5bba4..6b9c6c86 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -51,7 +51,7 @@ impl PackageVersionConstraint { } } -impl std::convert::TryFrom for PackageVersionConstraint { +impl TryFrom for PackageVersionConstraint { type Error = anyhow::Error; fn try_from(s: String) -> Result { @@ -59,7 +59,7 @@ impl std::convert::TryFrom for PackageVersionConstraint { } } -impl std::convert::TryFrom<&str> for PackageVersionConstraint { +impl TryFrom<&str> for PackageVersionConstraint { type Error = anyhow::Error; fn try_from(s: &str) -> Result { diff --git a/src/repository/fs/path.rs b/src/repository/fs/path.rs index 83efb7ff..b5afa583 100644 --- a/src/repository/fs/path.rs +++ b/src/repository/fs/path.rs @@ -8,7 +8,6 @@ // SPDX-License-Identifier: EPL-2.0 // -use std::convert::TryFrom; use std::path::Component; use anyhow::anyhow; diff --git a/src/repository/fs/representation.rs b/src/repository/fs/representation.rs index df74b82e..344fb371 100644 --- a/src/repository/fs/representation.rs +++ b/src/repository/fs/representation.rs @@ -9,8 +9,6 @@ // use std::collections::HashMap; -use std::convert::TryFrom; -use std::convert::TryInto; use std::path::Path; use std::path::PathBuf; From 3f8dceb61436f4111680f8aa17e454a5a87f32f0 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 2 Apr 2024 15:34:05 +0200 Subject: [PATCH 013/150] Remove redundant imports of the diesel::pg::PgConnection struct The `PgConnection` struct is part of the Diesel prelude [0]. A newer version of the Rust toolchain (1.78) detected these redundant imports. We should likely use the Diesel prelude in some other files as well [1]: > Diesel provides a prelude module, which exports most of the typically > used traits and types. We are conservative about what goes in this > module, and avoid anything which has a generic name. Files which use > Diesel are expected to have use diesel::prelude::*;. [0]: https://docs.rs/diesel/2.1.5/diesel/prelude/index.html [1]: https://docs.rs/diesel/2.1.5/diesel/index.html#getting-started Signed-off-by: Michael Weiss --- src/db/connection.rs | 1 - src/db/models/artifact.rs | 1 - src/db/models/endpoint.rs | 1 - src/db/models/envvar.rs | 1 - src/db/models/githash.rs | 1 - src/db/models/image.rs | 1 - src/db/models/job.rs | 1 - src/db/models/job_env.rs | 1 - src/db/models/package.rs | 1 - src/db/models/releases.rs | 1 - src/db/models/submit.rs | 1 - 11 files changed, 11 deletions(-) diff --git a/src/db/connection.rs b/src/db/connection.rs index e03c004d..412c893f 100644 --- a/src/db/connection.rs +++ b/src/db/connection.rs @@ -11,7 +11,6 @@ use anyhow::Error; use anyhow::Result; use clap::ArgMatches; -use diesel::pg::PgConnection; use diesel::prelude::*; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; diff --git a/src/db/models/artifact.rs b/src/db/models/artifact.rs index 9df96692..20feccb1 100644 --- a/src/db/models/artifact.rs +++ b/src/db/models/artifact.rs @@ -17,7 +17,6 @@ use anyhow::Error; use anyhow::Result; use chrono::NaiveDateTime; use diesel::prelude::*; -use diesel::PgConnection; use crate::db::models::Job; use crate::db::models::Release; diff --git a/src/db/models/endpoint.rs b/src/db/models/endpoint.rs index 4a26cb73..3ec1b8af 100644 --- a/src/db/models/endpoint.rs +++ b/src/db/models/endpoint.rs @@ -11,7 +11,6 @@ use anyhow::Error; use anyhow::Result; use diesel::prelude::*; -use diesel::PgConnection; use crate::config::EndpointName; use crate::schema::endpoints; diff --git a/src/db/models/envvar.rs b/src/db/models/envvar.rs index a276b193..46d36ede 100644 --- a/src/db/models/envvar.rs +++ b/src/db/models/envvar.rs @@ -11,7 +11,6 @@ use anyhow::Error; use anyhow::Result; use diesel::prelude::*; -use diesel::PgConnection; use crate::schema::envvars; use crate::schema::envvars::*; diff --git a/src/db/models/githash.rs b/src/db/models/githash.rs index d0dc43bb..8ea40093 100644 --- a/src/db/models/githash.rs +++ b/src/db/models/githash.rs @@ -12,7 +12,6 @@ use anyhow::Context; use anyhow::Error; use anyhow::Result; use diesel::prelude::*; -use diesel::PgConnection; use crate::schema::githashes; use crate::schema::githashes::*; diff --git a/src/db/models/image.rs b/src/db/models/image.rs index a701e6c5..8199ed69 100644 --- a/src/db/models/image.rs +++ b/src/db/models/image.rs @@ -11,7 +11,6 @@ use anyhow::Error; use anyhow::Result; use diesel::prelude::*; -use diesel::PgConnection; use crate::schema::images; use crate::schema::images::*; diff --git a/src/db/models/job.rs b/src/db/models/job.rs index 21d4c9be..e311d17d 100644 --- a/src/db/models/job.rs +++ b/src/db/models/job.rs @@ -12,7 +12,6 @@ use anyhow::Context; use anyhow::Error; use anyhow::Result; use diesel::prelude::*; -use diesel::PgConnection; use tracing::trace; use crate::db::models::{Endpoint, Image, Package, Submit}; diff --git a/src/db/models/job_env.rs b/src/db/models/job_env.rs index eee7ea12..c1864b31 100644 --- a/src/db/models/job_env.rs +++ b/src/db/models/job_env.rs @@ -10,7 +10,6 @@ use anyhow::Result; use diesel::prelude::*; -use diesel::PgConnection; use crate::db::models::EnvVar; use crate::db::models::Job; diff --git a/src/db/models/package.rs b/src/db/models/package.rs index 4a1d6921..e0b96a84 100644 --- a/src/db/models/package.rs +++ b/src/db/models/package.rs @@ -13,7 +13,6 @@ use std::ops::Deref; use anyhow::Error; use anyhow::Result; use diesel::prelude::*; -use diesel::PgConnection; use crate::schema::packages; use crate::schema::packages::*; diff --git a/src/db/models/releases.rs b/src/db/models/releases.rs index 507ac232..de607dce 100644 --- a/src/db/models/releases.rs +++ b/src/db/models/releases.rs @@ -12,7 +12,6 @@ use anyhow::Error; use anyhow::Result; use chrono::NaiveDateTime; use diesel::prelude::*; -use diesel::PgConnection; use crate::db::models::Artifact; use crate::db::models::ReleaseStore; diff --git a/src/db/models/submit.rs b/src/db/models/submit.rs index 101bb405..ef885bf5 100644 --- a/src/db/models/submit.rs +++ b/src/db/models/submit.rs @@ -13,7 +13,6 @@ use anyhow::Error; use anyhow::Result; use chrono::NaiveDateTime; use diesel::prelude::*; -use diesel::PgConnection; use crate::db::models::GitHash; use crate::db::models::Image; From 786404ddfbb182afdac159df09059bb4dd462876 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 2 Apr 2024 16:04:23 +0200 Subject: [PATCH 014/150] Bump the MSRV to 1.76.0 to fix Clippy warnings We don't have to bump the MSRV yet but this is the cleanest solution to avoid hacks for the new `incompatible_msrv` Clippy lint [0] that got added in 1.78.0. We'll probably have to bump the MSRV soon anyway (for dependency updates) so let's just do it right away to get rid of those false positives (we use `result_inspect::ResultInspect` for older Rust versions but Clippy can't consider the `#[rustversion::since(1.76)]`). [0]: https://rust-lang.github.io/rust-clippy/master/index.html#/incompatible_msrv Signed-off-by: Michael Weiss --- .github/workflows/cargo.yml | 8 ++++---- Cargo.lock | 7 ------- Cargo.toml | 3 +-- README.md | 2 +- src/endpoint/configured.rs | 2 -- src/filestore/staging.rs | 2 -- src/main.rs | 3 --- 7 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index f70c596c..9d9354e5 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -14,7 +14,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@v1 with: - toolchain: 1.74.0 # MSRV + toolchain: 1.76.0 # MSRV components: rustfmt - name: Run cargo fmt @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.74.0 # MSRV + - 1.76.0 # MSRV - stable - beta @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.74.0 # MSRV + - 1.76.0 # MSRV - stable - beta steps: @@ -99,7 +99,7 @@ jobs: fail-fast: false matrix: include: - - rust: 1.74.0 # MSRV + - rust: 1.76.0 # MSRV optional: false - rust: beta optional: true diff --git a/Cargo.lock b/Cargo.lock index fd8efe1a..ba1b69e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -244,7 +244,6 @@ dependencies = [ "regex", "reqwest", "resiter", - "result-inspect", "rlimit", "rustversion", "serde", @@ -1984,12 +1983,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbc95d56eb1865f69288945759cc0879d60ee68168dce676730275804ad2b276" -[[package]] -name = "result-inspect" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a950f8ecfa2029aec35fed979f0a412e593926f67bf771f7b98509b08db160" - [[package]] name = "rlimit" version = "0.10.1" diff --git a/Cargo.toml b/Cargo.toml index a8e99752..d6bb138c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ authors = [ "Michael Weiss ", # @primeos-work ] edition = "2021" -rust-version = "1.74.0" # MSRV +rust-version = "1.76.0" # MSRV license = "EPL-2.0" description = "Linux package tool utilizing Docker, PostgreSQL, and TOML" @@ -57,7 +57,6 @@ rayon = "1" regex = "1" reqwest = { version = "0.11", features = [ "stream" ] } resiter = "0.5" -result-inspect = "0.3" rlimit = "0.10" rustversion = "1" serde = "1" diff --git a/README.md b/README.md index da92b9d1..66df8637 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Building butido is easy, assuming you have a Rust installation: cargo build --release # (remove --release for a debug build) ``` -Butido is built and tested with Rust 1.74.0 as MSRV. +Butido is built and tested with Rust 1.76.0 as MSRV. ### (Development) Setup diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index 196be796..035da583 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -19,8 +19,6 @@ use anyhow::Error; use anyhow::Result; use futures::FutureExt; use getset::{CopyGetters, Getters}; -#[rustversion::before(1.76)] -use result_inspect::ResultInspect; use shiplift::Container; use shiplift::Docker; use shiplift::ExecContainerOptions; diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs index 38148881..4d7d15a4 100644 --- a/src/filestore/staging.rs +++ b/src/filestore/staging.rs @@ -16,8 +16,6 @@ use anyhow::Error; use anyhow::Result; use futures::stream::Stream; use indicatif::ProgressBar; -#[rustversion::before(1.76)] -use result_inspect::ResultInspect; use tracing::trace; use crate::filestore::path::ArtifactPath; diff --git a/src/main.rs b/src/main.rs index a0efb96a..220956a4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -54,9 +54,6 @@ use anyhow::Error; use anyhow::Result; use aquamarine as _; use clap::ArgMatches; -// TODO: Drop the rust-inspect dependency once we bump the MSRV to 1.76: -#[rustversion::since(1.76)] -use result_inspect as _; use tracing::{debug, error}; mod cli; From a7e56800a44600fb709062c24549e60852fb7099 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 2 Apr 2024 16:34:52 +0200 Subject: [PATCH 015/150] Remove redundant imports for tests A newer version of the Rust toolchain (1.78) detected these redundant imports that are already covered by `use super::*`. Signed-off-by: Michael Weiss --- src/log/parser.rs | 2 -- src/package/dag.rs | 2 -- src/package/dependency/mod.rs | 1 - src/package/package.rs | 6 +----- src/util/filters.rs | 1 - 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/log/parser.rs b/src/log/parser.rs index 2a54aedb..4b57d3e0 100644 --- a/src/log/parser.rs +++ b/src/log/parser.rs @@ -145,8 +145,6 @@ pub fn parser<'a>() -> PomParser<'a, u8, LogItem> { #[cfg(test)] mod tests { use super::*; - use anyhow::Error; - use anyhow::Result; // Helper function for showing log item in error message in pretty fn prettify_item(e: &LogItem) -> String { diff --git a/src/package/dag.rs b/src/package/dag.rs index 97af1975..f58517ee 100644 --- a/src/package/dag.rs +++ b/src/package/dag.rs @@ -319,8 +319,6 @@ mod tests { use crate::package::Dependency; use crate::util::docker::ImageName; - use indicatif::ProgressBar; - #[test] fn test_add_package() { let mut btree = BTreeMap::new(); diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 7faacf7c..7f6c8c45 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -76,7 +76,6 @@ pub(in crate::package::dependency) fn parse_package_dependency_string_into_name_ mod tests { use super::*; - use crate::package::PackageName; use crate::package::PackageVersion; // diff --git a/src/package/package.rs b/src/package/package.rs index 50f5fe3b..05647cec 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -276,11 +276,7 @@ impl Dependencies { #[cfg(test)] pub mod tests { use super::*; - use crate::package::Dependencies; - use crate::package::HashType; - use crate::package::HashValue; - use crate::package::Source; - use crate::package::SourceHash; + use url::Url; /// helper function for quick object construction diff --git a/src/util/filters.rs b/src/util/filters.rs index dca693ee..2139188c 100644 --- a/src/util/filters.rs +++ b/src/util/filters.rs @@ -91,7 +91,6 @@ mod tests { use std::collections::BTreeMap; use resiter::Filter; - use resiter::Map; use crate::package::tests::package; use crate::package::tests::pname; From 565fa04ccdbfef341fd486f0ca50b5e12ce29643 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 2 Apr 2024 16:46:02 +0200 Subject: [PATCH 016/150] Replace an unnecessary `.get().is_some()` check This fixes a warning from the new `unnecessary_get_then_check` Clippy lint [0] that got added in `1.78.0`. [0]: https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_get_then_check Signed-off-by: Michael Weiss --- src/config/not_validated.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index d88baef0..e6b5ed61 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -298,7 +298,7 @@ mod tests { assert!(changelog.is_ok()); let changelog = changelog.unwrap(); for i in 0..=CONFIGURATION_VERSION { - assert!(changelog.get(&i.to_string()).is_some()); + assert!(changelog.contains_key(&i.to_string())); } } From ebcb81a7235aa8f171fe96fb4456858497cf4064 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 2 Apr 2024 16:55:32 +0200 Subject: [PATCH 017/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 388 +++++++++++++++++++++++++++-------------------------- 1 file changed, 197 insertions(+), 191 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba1b69e1..c11a7647 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "aquamarine" @@ -106,7 +106,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -117,26 +117,26 @@ checksum = "3c2bee9b9ee0e5768772e38c07ef0ba23a490d7e1336ec7207c25712a2661c55" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -176,9 +176,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "block-buffer" @@ -196,15 +196,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "serde", ] [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "butido" @@ -256,7 +256,7 @@ dependencies = [ "terminal_size", "tokio", "tokio-stream", - "toml 0.8.10", + "toml 0.8.12", "tracing", "tracing-subscriber", "typed-builder", @@ -283,9 +283,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bytesize" @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -327,10 +327,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.88" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ + "jobserver", "libc", ] @@ -342,9 +343,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", @@ -357,18 +358,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.1" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -558,11 +559,11 @@ dependencies = [ [[package]] name = "diesel" -version = "2.1.4" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8" +checksum = "03fc05c17098f21b89bc7d98fe1dd3cce2c11c2ad8e145f2a44fe08ed28eb559" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "chrono", "diesel_derives", @@ -575,14 +576,14 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8337737574f55a468005a83499da720f20c65586241ffea339db9ecdfd2b44" +checksum = "5d02eecb814ae714ffe61ddc2db2dd03e6c49a42e269b5001355500d431cce0c" dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -602,7 +603,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -654,9 +655,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "filetime" @@ -778,7 +779,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -864,11 +865,11 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git2" -version = "0.18.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "libgit2-sys", "log", @@ -885,11 +886,11 @@ checksum = "641b847f0375f4b2c595438eefc17a9c0fbf47b400cbdd1ad9332bf1e16b779d" [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "fnv", "futures-core", "futures-sink", @@ -904,9 +905,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "5.1.0" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab283476b99e66691dee3f1640fea91487a8d81f50fb5ecc75538f8f8879a1e4" +checksum = "d08485b96a0e6393e9e4d1b8d48cf74ad6c063cd905eb33f42c1ce3f0377539b" dependencies = [ "log", "pest", @@ -945,11 +946,11 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "fnv", "itoa", ] @@ -960,7 +961,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "http", "pin-project-lite", ] @@ -989,7 +990,7 @@ dependencies = [ "os_info", "serde", "serde_derive", - "toml 0.8.10", + "toml 0.8.12", "uuid", ] @@ -1005,7 +1006,7 @@ version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "futures-channel", "futures-core", "futures-util", @@ -1047,7 +1048,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "hyper", "native-tls", "tokio", @@ -1063,7 +1064,7 @@ dependencies = [ "futures-util", "hex", "hyper", - "pin-project 1.1.4", + "pin-project 1.1.5", "tokio", ] @@ -1121,9 +1122,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.4" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "967d6dd42f16dbf0eb8040cb9e477933562684d3918f7d253f2ff9087fb3e7a3" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -1144,9 +1145,9 @@ dependencies = [ [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "instant" @@ -1183,15 +1184,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1238,9 +1248,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.15" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" dependencies = [ "cc", "libc", @@ -1250,12 +1260,9 @@ dependencies = [ [[package]] name = "line-wrap" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] +checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" [[package]] name = "linked-hash-map" @@ -1305,9 +1312,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "migrations_internals" @@ -1483,7 +1490,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -1500,7 +1507,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -1511,9 +1518,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -1523,13 +1530,13 @@ dependencies = [ [[package]] name = "os_info" -version = "3.7.0" +version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" dependencies = [ "log", "serde", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -1569,7 +1576,7 @@ checksum = "06af5f9333eb47bd9ba8462d612e37a8328a5cb80b13f0af4de4c3b89f52dee5" dependencies = [ "parse-display-derive", "regex", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -1581,9 +1588,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", "structmeta", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -1600,9 +1607,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.7" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ "memchr", "thiserror", @@ -1611,9 +1618,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.7" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" dependencies = [ "pest", "pest_generator", @@ -1621,22 +1628,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.7" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] name = "pest_meta" -version = "2.7.7" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", @@ -1664,11 +1671,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ - "pin-project-internal 1.1.4", + "pin-project-internal 1.1.5", ] [[package]] @@ -1684,20 +1691,20 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1713,9 +1720,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plist" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" +checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" dependencies = [ "base64 0.21.7", "indexmap", @@ -1727,9 +1734,9 @@ dependencies = [ [[package]] name = "pom" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2d73a5fe10d458e77534589512104e5aa8ac480aa9ac30b74563274235cce4" +checksum = "6c972d8f86e943ad532d0b04e8965a749ad1d18bb981a9c7b3ae72fe7fd7744b" dependencies = [ "bstr", ] @@ -1787,9 +1794,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -1864,9 +1871,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -1893,14 +1900,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -1914,13 +1921,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -1931,18 +1938,18 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", - "bytes 1.5.0", + "bytes 1.6.0", "encoding_rs", "futures-core", "futures-util", @@ -2000,11 +2007,11 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -2032,12 +2039,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -2073,9 +2074,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2086,9 +2087,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -2120,14 +2121,14 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -2200,7 +2201,7 @@ checksum = "1e468265908f45299c26571dad9a2e5cb3656eceb51cd58f1441cf61aa71aad6" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.5.0", + "bytes 1.6.0", "chrono", "flate2", "futures-util", @@ -2211,7 +2212,7 @@ dependencies = [ "log", "mime", "openssl", - "pin-project 1.1.4", + "pin-project 1.1.5", "serde", "serde_json", "tar", @@ -2239,9 +2240,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -2268,7 +2269,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -2279,7 +2280,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -2295,9 +2296,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" dependencies = [ "proc-macro2", "quote", @@ -2323,7 +2324,7 @@ dependencies = [ "once_cell", "onig", "plist", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", "serde", "serde_derive", "serde_json", @@ -2388,22 +2389,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -2466,12 +2467,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", - "bytes 1.5.0", + "bytes 1.6.0", "libc", "mio", "num_cpus", @@ -2490,7 +2491,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -2517,9 +2518,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -2532,7 +2533,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "futures-core", "futures-sink", "pin-project-lite", @@ -2563,14 +2564,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.6", + "toml_edit 0.22.9", ] [[package]] @@ -2597,15 +2598,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.6" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.3", + "winnow 0.6.5", ] [[package]] @@ -2639,7 +2640,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -2704,7 +2705,7 @@ checksum = "563b3b88238ec95680aef36bdece66896eaa7ce3c0f1b4f39d38fb2435261352" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", ] [[package]] @@ -2772,9 +2773,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", "serde", @@ -2814,9 +2815,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -2839,9 +2840,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2849,24 +2850,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -2876,9 +2877,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2886,22 +2887,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.57", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-streams" @@ -2918,9 +2919,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -2928,15 +2929,14 @@ dependencies = [ [[package]] name = "which" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa5e0c10bf77f44aac573e498d1a82d5fbd5e91f6fc0a99e7be4b38e85e101c" +checksum = "8211e4f58a2b2805adfbefbc07bab82958fc91e3836339b1ab7ae32465dce0d7" dependencies = [ "either", "home", - "once_cell", "rustix", - "windows-sys 0.52.0", + "winsafe", ] [[package]] @@ -3122,9 +3122,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e19b97e00a4d3db3cdb9b53c8c5f87151b5689b82cc86c2848cbdcccb2689b" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -3139,6 +3139,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + [[package]] name = "xattr" version = "1.3.1" From f2f9f2c5fdf6af0eefef36bbcb4a2356e311a395 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:42:47 +0000 Subject: [PATCH 018/150] build(deps): bump reqwest from 0.11.24 to 0.12.2 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.24 to 0.12.2. - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.24...v0.12.2) --- updated-dependencies: - dependency-name: reqwest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 133 +++++++++++++++++++++++++++++++++++++++++++++-------- Cargo.toml | 2 +- 2 files changed, 115 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c11a7647..d2b3fa1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -886,16 +886,16 @@ checksum = "641b847f0375f4b2c595438eefc17a9c0fbf47b400cbdd1ad9332bf1e16b779d" [[package]] name = "h2" -version = "0.3.25" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" dependencies = [ "bytes 1.6.0", "fnv", "futures-core", "futures-sink", "futures-util", - "http", + "http 1.1.0", "indexmap", "slab", "tokio", @@ -955,6 +955,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes 1.6.0", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -962,7 +973,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes 1.6.0", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes 1.6.0", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes 1.6.0", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -1010,9 +1044,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -1024,14 +1057,34 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +dependencies = [ + "bytes 1.6.0", + "futures-channel", + "futures-util", + "h2", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-openssl" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" dependencies = [ - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.28", "linked_hash_set", "once_cell", "openssl", @@ -1044,15 +1097,38 @@ dependencies = [ [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes 1.6.0", - "hyper", + "http-body-util", + "hyper 1.2.0", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes 1.6.0", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.2.0", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -1063,7 +1139,7 @@ checksum = "0fafdf7b2b2de7c9784f76e02c0935e65a8117ec3b768644379983ab333ac98c" dependencies = [ "futures-util", "hex", - "hyper", + "hyper 0.14.28", "pin-project 1.1.5", "tokio", ] @@ -1944,9 +2020,9 @@ checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "2d66674f2b6fb864665eea7a3c1ac4e3dfacd2fda83cf6f935a612e01b0e3338" dependencies = [ "base64 0.21.7", "bytes 1.6.0", @@ -1954,10 +2030,12 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", - "hyper", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.2.0", "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", @@ -2206,7 +2284,7 @@ dependencies = [ "flate2", "futures-util", "futures_codec", - "hyper", + "hyper 0.14.28", "hyper-openssl", "hyperlocal", "log", @@ -2609,6 +2687,22 @@ dependencies = [ "winnow 0.6.5", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project 1.1.5", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-layer" version = "0.3.2" @@ -2627,6 +2721,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", diff --git a/Cargo.toml b/Cargo.toml index d6bb138c..57b25889 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ ptree = { version = "0.4", default-features = false } rand = "0.8" rayon = "1" regex = "1" -reqwest = { version = "0.11", features = [ "stream" ] } +reqwest = { version = "0.12", features = [ "stream" ] } resiter = "0.5" rlimit = "0.10" rustversion = "1" From f205256dd568e939ffc3d37c3504595369c397e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:10:26 +0000 Subject: [PATCH 019/150] build(deps): bump h2 from 0.4.3 to 0.4.4 Bumps [h2](https://github.com/hyperium/h2) from 0.4.3 to 0.4.4. - [Release notes](https://github.com/hyperium/h2/releases) - [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/h2/compare/v0.4.3...v0.4.4) --- updated-dependencies: - dependency-name: h2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2b3fa1a..c557d5df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -886,9 +886,9 @@ checksum = "641b847f0375f4b2c595438eefc17a9c0fbf47b400cbdd1ad9332bf1e16b779d" [[package]] name = "h2" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" dependencies = [ "bytes 1.6.0", "fnv", From 18a383d28a5e84a82d97c8eba5641303cd81fedb Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 7 Mar 2024 08:14:35 +0100 Subject: [PATCH 020/150] Add tracing instrumentation to Orchestrator The tracing "instrumentation" (yes, in quotes) that was used before this patch was not really an instrumentation. It was rather a better form of using the `log` crate. This patch introduces some spans and associated tracing events for the "meat" of the orchestrator algorithm. Also, the tracing events now have fields instead of interpolating some values in the trace message. The tracing here is not really soffisticated yet, but it should be miles better than the tracing before. Signed-off-by: Matthias Beyer --- src/orchestrator/orchestrator.rs | 134 ++++++++++++++++++------------- 1 file changed, 77 insertions(+), 57 deletions(-) diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 094f5a60..03fda41c 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -31,6 +31,7 @@ use tokio::sync::mpsc::Receiver; use tokio::sync::mpsc::Sender; use tokio::sync::RwLock; use tokio_stream::StreamExt; +use tracing::Instrument; use tracing::{debug, error, trace}; use typed_builder::TypedBuilder; use uuid::Uuid; @@ -267,6 +268,14 @@ impl<'a> Orchestrator<'a> { } async fn run_tree(self) -> Result<(Vec, HashMap)> { + let prepare_span = tracing::debug_span!("run tree preparation"); + + // There is no async code until we drop this guard, so this is fine + // + // WARNING: If async/await code is added between this and `drop(prepare_span_guard)`, the + // traces from this span _will_ be wrong. + let prepare_span_guard = prepare_span.enter(); + let multibar = Arc::new({ let mp = indicatif::MultiProgress::new(); if self.progress_generator.hide() { @@ -319,8 +328,8 @@ impl<'a> Orchestrator<'a> { let (sender, receiver) = tokio::sync::mpsc::channel(100); trace!( - "Creating TaskPreparation object for job {}", - jobdef.job.uuid() + job_uuid = %jobdef.job.uuid(), + "Creating TaskPreparation object for job" ); let bar = self.progress_generator.bar()?; let bar = multibar.add(bar); @@ -389,6 +398,7 @@ impl<'a> Orchestrator<'a> { .collect::>>>()?; trace!( + job_uuid = %job.1.jobdef.job.uuid(), "{:?} is depending on {}", depending_on_job, job.1.jobdef.job.uuid() @@ -415,7 +425,7 @@ impl<'a> Orchestrator<'a> { .find(|j| j.3.borrow().is_none()) .ok_or_else(|| anyhow!("Failed to find root task"))?; let root_job_id = root_job.1.jobdef.job.uuid(); - trace!("Root job id = {}", root_job_id); + trace!(%root_job_id, "Root job id found"); // Move the progress bar for the root task to the bottom to ensure that it will be visible // without having to scroll up (the MultiProgress implementation doesn't let us modify the // order so we have to remove and re-add it - it works despite the clone because @@ -427,6 +437,10 @@ impl<'a> Orchestrator<'a> { // Create a sender and a receiver for the root of the tree let (root_sender, mut root_receiver) = tokio::sync::mpsc::channel(100); + // preparation ended + drop(prepare_span_guard); + drop(prepare_span); + // Make all prepared jobs into real jobs and run them // // This maps each TaskPreparation with its sender and receiver to a JobTask and calls the @@ -434,10 +448,11 @@ impl<'a> Orchestrator<'a> { // // The JobTask::run implementation handles the rest, we just have to wait for all futures // to succeed. + let run_span = tracing::debug_span!("run"); let running_jobs = jobs .into_iter() .map(|prep| { - trace!("Creating JobTask for = {}", prep.1.jobdef.job.uuid()); + trace!(parent: &run_span, job_uuid = %prep.1.jobdef.job.uuid(), "Creating JobTask"); // the sender is set or we need to use the root sender let sender = prep .3 @@ -445,13 +460,23 @@ impl<'a> Orchestrator<'a> { .unwrap_or_else(|| vec![root_sender.clone()]); JobTask::new(prep.0, prep.1, sender) }) - .inspect(|task| trace!("Running: {}", task.jobdef.job.uuid())) - .map(|task| task.run()) + .inspect( + |task| trace!(parent: &run_span, job_uuid = %task.jobdef.job.uuid(), "Running job"), + ) + .map(|task| { + task.run() + .instrument(tracing::debug_span!(parent: &run_span, "JobTask::run")) + }) .collect::>(); debug!("Built {} jobs", running_jobs.len()); - running_jobs.collect::>().await?; - trace!("All jobs finished"); + running_jobs + .collect::>() + .instrument(run_span.clone()) + .await?; + trace!(parent: &run_span, "All jobs finished"); + drop(run_span); + match root_receiver.recv().await { None => Err(anyhow!("No result received...")), Some(Ok(results)) => { @@ -588,10 +613,10 @@ impl<'a> JobTask<'a> { /// This function runs the job from this object on the scheduler as soon as all dependend jobs /// returned successfully. async fn run(mut self) -> Result<()> { - debug!("[{}]: Running", self.jobdef.job.uuid()); + debug!(job_uuid = %self.jobdef.job.uuid(), "Running"); debug!( - "[{}]: Waiting for dependencies = {:?}", - self.jobdef.job.uuid(), + job_uuid = %self.jobdef.job.uuid(), + "Waiting for dependencies = {:?}", { self.jobdef .dependencies @@ -618,6 +643,7 @@ impl<'a> JobTask<'a> { }; // as long as the job definition lists dependencies that are not in the received_dependencies list... + let dependency_receiving_span = tracing::debug_span!("receiving dependencies"); while !all_dependencies_are_in(&self.jobdef.dependencies, &received_dependencies) { // Update the status bar message self.bar.set_message({ @@ -633,30 +659,32 @@ impl<'a> JobTask<'a> { dep_len ) }); - trace!("[{}]: Updated bar", self.jobdef.job.uuid()); - - trace!("[{}]: receiving...", self.jobdef.job.uuid()); - // receive from the receiver - let continue_receiving = self - .perform_receive(&mut received_dependencies, &mut received_errors) - .await?; + trace!(job_uuid = %self.jobdef.job.uuid(), "Updated bar"); + + let continue_receiving = { + let recv_span = tracing::trace_span!(parent: &dependency_receiving_span, "receiving", job_uuid = %self.jobdef.job.uuid(), errors = tracing::field::Empty); + // receive from the receiver + let continue_receiving = self + .perform_receive(&mut received_dependencies, &mut received_errors) + .instrument(recv_span.clone()) + .await?; + recv_span.record( + "errors", + tracing::field::display(&received_errors.display_error_map()), + ); + continue_receiving + }; - trace!( - "[{}]: Received errors = {}", - self.jobdef.job.uuid(), - received_errors.display_error_map() - ); // if there are any errors from child tasks if !received_errors.is_empty() { // send them to the parent,... // // We only send to one parent, because it doesn't matter // And we know that we have at least one sender - error!( - "[{}]: Received errors = {}", - self.jobdef.job.uuid(), - received_errors.display_error_map() - ); + error!(parent: &dependency_receiving_span, + job_uuid = %self.jobdef.job.uuid(), + errors = tracing::field::display(&received_errors.display_error_map()), + "Received errors"); self.sender[0].send(Err(received_errors)).await; // ... and stop operation, because the whole tree will fail anyways. @@ -673,6 +701,7 @@ impl<'a> JobTask<'a> { break; } } + drop(dependency_receiving_span); // Check if any of the received dependencies was built (and not reused). // If any dependency was built, we need to build as well. @@ -729,14 +758,14 @@ impl<'a> JobTask<'a> { .run()?; debug!( - "[{}]: Found {} replacement artifacts", - self.jobdef.job.uuid(), - replacement_artifacts.len() + job_uuid = %self.jobdef.job.uuid(), + replacement_artifacts_count = replacement_artifacts.len(), + "Found replacement artifacts", ); trace!( - "[{}]: Found replacement artifacts: {:?}", - self.jobdef.job.uuid(), - replacement_artifacts + job_uuid = %self.jobdef.job.uuid(), + ?replacement_artifacts, + "Found replacement artifacts", ); let mut artifacts = replacement_artifacts .into_iter() @@ -770,11 +799,7 @@ impl<'a> JobTask<'a> { if !artifacts.is_empty() { received_dependencies.insert(*self.jobdef.job.uuid(), artifacts); - trace!( - "[{}]: Sending to parent: {:?}", - self.jobdef.job.uuid(), - received_dependencies - ); + trace!(job_uuid = %self.jobdef.job.uuid(), "Sending to parent: {:?}", received_dependencies); for s in self.sender.iter() { s.send(Ok(received_dependencies.clone())) .await @@ -809,8 +834,8 @@ impl<'a> JobTask<'a> { .cloned() .collect::>(); trace!( - "[{}]: Dependency artifacts = {:?}", - self.jobdef.job.uuid(), + job_uuid = %self.jobdef.job.uuid(), + "Dependency artifacts = {:?}", dependency_artifacts ); self.bar.set_message(format!( @@ -847,11 +872,7 @@ impl<'a> JobTask<'a> { .await? { Err(e) => { - trace!( - "[{}]: Scheduler returned error = {:?}", - self.jobdef.job.uuid(), - e - ); + trace!(job_uuid = %self.jobdef.job.uuid(), "Scheduler returned error = {:?}", e); // ... and we send that to our parent // // We only send to one parent, because it doesn't matter anymore @@ -874,8 +895,8 @@ impl<'a> JobTask<'a> { // it returns the database artifact objects it created! Ok(artifacts) => { trace!( - "[{}]: Scheduler returned artifacts = {:?}", - self.jobdef.job.uuid(), + job_uuid = %self.jobdef.job.uuid(), + "Scheduler returned artifacts = {:?}", artifacts ); @@ -910,22 +931,22 @@ impl<'a> JobTask<'a> { Some(Ok(mut v)) => { // The task we depend on succeeded and returned an // (uuid of the job, [ArtifactPath]) - trace!("[{}]: Received: {:?}", self.jobdef.job.uuid(), v); + trace!(job_uuid = %self.jobdef.job.uuid(), "Received: {:?}", v); received_dependencies.extend(v); Ok(true) } Some(Err(mut e)) => { // The task we depend on failed // we log that error for now - trace!("[{}]: Received: {:?}", self.jobdef.job.uuid(), e); + trace!(job_uuid = %self.jobdef.job.uuid(), "Received: {:?}", e); received_errors.extend(e); Ok(true) } None => { // The task we depend on finished... we must check what we have now... trace!( - "[{}]: Received nothing, channel seems to be empty", - self.jobdef.job.uuid() + job_uuid = %self.jobdef.job.uuid(), + "Received nothing, channel seems to be empty", ); // If the channel was closed and there are already errors in the `received_errors` @@ -933,8 +954,8 @@ impl<'a> JobTask<'a> { // receiving if !received_errors.is_empty() { trace!( - "[{}]: There are errors, stop receiving", - self.jobdef.job.uuid() + job_uuid = %self.jobdef.job.uuid(), + "There are errors, stop receiving", ); return Ok(false); } @@ -947,9 +968,8 @@ impl<'a> JobTask<'a> { .iter() .filter(|d| !received.contains(d)) .collect(); - trace!( - "[{}]: Missing dependencies = {:?}", - self.jobdef.job.uuid(), + trace!(job_uuid = %self.jobdef.job.uuid(), + "Missing dependencies = {:?}", missing_deps ); From 27d25c462abe8f83b297e181b7c664355eb25552 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 7 Mar 2024 08:17:48 +0100 Subject: [PATCH 021/150] Move imports out of fn The imports are only for one fn in this file, so lets move them to the top where all other imports are, to have them all together. Signed-off-by: Matthias Beyer --- src/commands/build.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/build.rs b/src/commands/build.rs index 41cc135f..b439a6ae 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -35,6 +35,7 @@ use tracing::{debug, info, trace, warn}; use uuid::Uuid; use crate::config::*; +use crate::db::models::{EnvVar, GitHash, Image, Job, Package, Submit}; use crate::filestore::path::StoreRoot; use crate::filestore::ReleaseStore; use crate::filestore::StagingStore; @@ -49,6 +50,7 @@ use crate::package::Shebang; use crate::repository::Repository; use crate::schema; use crate::source::SourceCache; +use crate::util::docker::resolve_image_name; use crate::util::progress::ProgressBars; use crate::util::EnvironmentVariableName; @@ -63,9 +65,6 @@ pub async fn build( repo: Repository, repo_path: &Path, ) -> Result<()> { - use crate::db::models::{EnvVar, GitHash, Image, Job, Package, Submit}; - use crate::util::docker::resolve_image_name; - let git_repo = git2::Repository::open(repo_path) .with_context(|| anyhow!("Opening repository at {}", repo_path.display()))?; From 3a7f5fe36a4a6fa95c94e463e686b169b5c37606 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 7 Mar 2024 08:35:06 +0100 Subject: [PATCH 022/150] Add instrumentation for "build" command This adds some light tracing instrumentation on the "build" command, with no changes in the events emitted, but only some spans around the different phases of the command. Signed-off-by: Matthias Beyer --- src/commands/build.rs | 51 +++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/src/commands/build.rs b/src/commands/build.rs index b439a6ae..ff7049cd 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -31,6 +31,7 @@ use diesel::RunQueryDsl; use itertools::Itertools; use tokio::sync::RwLock; use tokio_stream::StreamExt; +use tracing::Instrument; use tracing::{debug, info, trace, warn}; use uuid::Uuid; @@ -65,6 +66,12 @@ pub async fn build( repo: Repository, repo_path: &Path, ) -> Result<()> { + let command_span = tracing::debug_span!("command-build"); + + let loading_span = tracing::debug_span!(parent: &command_span, "loading"); + // There's no async code for a long time in this function, so this is safe. + let loading_span_guard = loading_span.enter(); + let git_repo = git2::Repository::open(repo_path) .with_context(|| anyhow!("Opening repository at {}", repo_path.display()))?; @@ -180,6 +187,8 @@ pub async fn build( }) .collect::>>()?; + drop(loading_span_guard); + let (staging_store, staging_dir, submit_id) = { let bar_staging_loading = progressbars.bar()?; @@ -187,6 +196,7 @@ pub async fn build( matches.get_one::("staging_dir").map(PathBuf::from) { info!( + parent: &loading_span, "Setting staging dir to {} for this run", staging_dir.display() ); @@ -213,10 +223,14 @@ pub async fn build( }; if !p.is_dir() { - tokio::fs::create_dir_all(&p).await?; + tokio::fs::create_dir_all(&p) + .instrument( + tracing::trace_span!(parent: &loading_span, "Creating directories", path = ?p), + ) + .await?; } - debug!("Loading staging directory: {}", p.display()); + debug!(parent: &loading_span, "Loading staging directory: {}", p.display()); let r = StagingStore::load(StoreRoot::new(p.clone())?, &bar_staging_loading); if r.is_ok() { bar_staging_loading.finish_with_message("Loaded staging successfully"); @@ -248,19 +262,20 @@ pub async fn build( let source_cache = SourceCache::new(config.source_cache_root().clone()); if matches.get_flag("no_verification") { - warn!("No hash verification will be performed"); + warn!(parent: &loading_span, "No hash verification will be performed"); } else { crate::commands::source::verify_impl( dag.all_packages().into_iter(), &source_cache, &progressbars, ) + .instrument(tracing::trace_span!(parent: &loading_span, "verify source hashes")) .await?; } // linting the package scripts if matches.get_flag("no_lint") { - warn!("No script linting will be performed!"); + warn!(parent: &loading_span, "No script linting will be performed!"); } else if let Some(linter) = crate::ui::find_linter_command(repo_root, config)? { let all_packages = dag.all_packages(); let bar = progressbars.bar()?; @@ -270,7 +285,7 @@ pub async fn build( let iter = all_packages.into_iter(); crate::commands::util::lint_packages(iter, &linter, config, bar).await?; } else { - warn!("No linter set in configuration, no script linting will be performed!"); + warn!(parent: &loading_span, "No linter set in configuration, no script linting will be performed!"); } // linting dag.all_packages() @@ -302,7 +317,10 @@ pub async fn build( }) .collect::>>()?; - trace!("Setting up database jobs for Package, GitHash, Image"); + drop(loading_span); + let submit_span = tracing::debug_span!(parent: &command_span, "submit"); + + trace!(parent: &submit_span, "Setting up database jobs for Package, GitHash, Image"); let db_package = async { Package::create_or_fetch(&mut database_pool.get().unwrap(), package) }; let db_githash = async { GitHash::create_or_fetch(&mut database_pool.get().unwrap(), &hash_str) }; @@ -321,14 +339,14 @@ pub async fn build( .await }; - trace!("Running database jobs for Package, GitHash, Image"); + trace!(parent: &submit_span, "Running database jobs for Package, GitHash, Image"); let (db_package, db_githash, db_image, db_envs) = tokio::join!(db_package, db_githash, db_image, db_envs); let (db_package, db_githash, db_image, _) = (db_package?, db_githash?, db_image?, db_envs?); - trace!("Database jobs for Package, GitHash, Image finished successfully"); - trace!("Creating Submit in database"); + trace!(parent: &submit_span, "Database jobs for Package, GitHash, Image finished successfully"); + trace!(parent: &submit_span, "Creating Submit in database"); let submit = Submit::create( &mut database_pool.get().unwrap(), &now, @@ -338,6 +356,7 @@ pub async fn build( &db_githash, )?; trace!( + parent: &submit_span, "Creating Submit in database finished successfully: {:?}", submit ); @@ -363,13 +382,16 @@ pub async fn build( writeln!(outlock, "On repo hash: {}", mkgreen(&db_githash.hash))?; } - trace!("Setting up job sets"); + trace!(parent: &submit_span, "Setting up job sets"); let resources: Vec = additional_env.into_iter().map(JobResource::from).collect(); let jobdag = crate::job::Dag::from_package_dag(dag, shebang, image_name, phases.clone(), resources); - trace!("Setting up job sets finished successfully"); + trace!(parent: &submit_span, "Setting up job sets finished successfully"); + drop(submit_span); + + let build_span = tracing::debug_span!(parent: &command_span, "build"); - trace!("Setting up Orchestrator"); + trace!(parent: &build_span, "Setting up Orchestrator"); let orch = OrchestratorSetup::builder() .progress_generator(progressbars) .endpoint_config(endpoint_configurations) @@ -388,11 +410,12 @@ pub async fn build( .repository(git_repo) .build() .setup() + .instrument(build_span.clone()) .await?; - info!("Running orchestrator..."); + info!(parent: &build_span, "Running orchestrator..."); let mut artifacts = vec![]; - let errors = orch.run(&mut artifacts).await?; + let errors = orch.run(&mut artifacts).instrument(build_span).await?; let out = std::io::stdout(); let mut outlock = out.lock(); From 1bff23c830c78e59874e9da1bbfc95c6dff645b6 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 4 Apr 2024 19:06:39 +0200 Subject: [PATCH 023/150] examples/packages: Fix the file names of the sources The source hash suffix ("-{hash}") was dropped in 495b2dc so this resulted in "Source missing" errors. I used the following hack to rename the files (would be cleaner with Perl's "rename" but I had the binary from util-linux with no regex support installed): ``` find -type f \ | sed 's/.*/mv \0 \0/' \ | sed 's/src-[^ ]*.source$/src.source/' \ | bash ``` Signed-off-by: Michael Weiss --- doc/containers.md | 3 +-- examples/packages/repo/pkg.toml | 3 +-- ...a44f2b31c1fb553b6021e7360d07d5d91ff5e.source => src.source} | 0 ...8d8798a4380162d4b56f9b452e2f6f9e24e7a.source => src.source} | 0 ...b5c13ff90a36963278c6a39e4ee3c22e2a436.source => src.source} | 0 ...b057a2b9d96a4067a749ee3b3b0158d390cf1.source => src.source} | 0 ...474c0309b7ca09a182d888f73b37a8fe1362c.source => src.source} | 0 ...271b7830882da1791852baeca1737fcbe4b90.source => src.source} | 0 ...64f9dad9f60363c81b688324d95b4ec7c8038.source => src.source} | 0 ...571b41aa14adc10c5f3c987d43c02c8f5d498.source => src.source} | 0 ...bd567fa79cbe0196d093a067271361dc6ca8b.source => src.source} | 0 ...3d3a341877154d6e95211464e1df1015b74bd.source => src.source} | 0 ...1038f3463f511ee7403dbcbc87195302d891c.source => src.source} | 0 ...52e6dc057d1d825bf49df79d6b98eba846ebe.source => src.source} | 0 ...e44ad365b6b1ec75c5621a0ad067371102854.source => src.source} | 0 ...514d80869744a4e2f60d2fd37d6081f5ed01a.source => src.source} | 0 ...b596f04f7db9c2cad3d6b87dd2b3a05de4f35.source => src.source} | 0 ...6ea087bfdaf52380eae441077572ed289d657.source => src.source} | 0 ...8103e4fc71796e9708cafc43adeed0d1076b7.source => src.source} | 0 ...9c1f3fddff79893e5304f998f2f95ebebd149.source => src.source} | 0 ...f376fa71904ccde2a756a24a4e47ec014ee0a.source => src.source} | 0 ...f376fa71904ccde2a756a24a4e47ec014ee0a.source => src.source} | 0 ...f376fa71904ccde2a756a24a4e47ec014ee0a.source => src.source} | 0 ...58565fd06c37aa66b071160d156f5628cd518.source => src.source} | 0 ...cbb71d418ef8c7d583dd506a994b1bc1c3f7b.source => src.source} | 0 ...ca4290ebaf525721fc670ea53476a15957f9e.source => src.source} | 0 ...46dc0de48f39f98f9572b6560ca3f0916b715.source => src.source} | 0 ...990eea1cee9f421c933461a2f3c3dd741a58b.source => src.source} | 0 ...4ffdb7e1f4c736fb7ab897162332b4619d9ca.source => src.source} | 0 ...61d509d714f50e954ffeb49ac18222609cf2a.source => src.source} | 0 30 files changed, 2 insertions(+), 4 deletions(-) rename examples/packages/sources/a-1/{src-e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e.source => src.source} (100%) rename examples/packages/sources/b-2/{src-7448d8798a4380162d4b56f9b452e2f6f9e24e7a.source => src.source} (100%) rename examples/packages/sources/c-3/{src-a3db5c13ff90a36963278c6a39e4ee3c22e2a436.source => src.source} (100%) rename examples/packages/sources/d-4/{src-9c6b057a2b9d96a4067a749ee3b3b0158d390cf1.source => src.source} (100%) rename examples/packages/sources/e-5/{src-5d9474c0309b7ca09a182d888f73b37a8fe1362c.source => src.source} (100%) rename examples/packages/sources/f-6/{src-ccf271b7830882da1791852baeca1737fcbe4b90.source => src.source} (100%) rename examples/packages/sources/g-7/{src-d3964f9dad9f60363c81b688324d95b4ec7c8038.source => src.source} (100%) rename examples/packages/sources/h-8/{src-136571b41aa14adc10c5f3c987d43c02c8f5d498.source => src.source} (100%) rename examples/packages/sources/i-9/{src-b6abd567fa79cbe0196d093a067271361dc6ca8b.source => src.source} (100%) rename examples/packages/sources/j-10/{src-4143d3a341877154d6e95211464e1df1015b74bd.source => src.source} (100%) rename examples/packages/sources/k-11/{src-dd71038f3463f511ee7403dbcbc87195302d891c.source => src.source} (100%) rename examples/packages/sources/l-12/{src-ad552e6dc057d1d825bf49df79d6b98eba846ebe.source => src.source} (100%) rename examples/packages/sources/m-13/{src-feee44ad365b6b1ec75c5621a0ad067371102854.source => src.source} (100%) rename examples/packages/sources/n-14/{src-030514d80869744a4e2f60d2fd37d6081f5ed01a.source => src.source} (100%) rename examples/packages/sources/o-15/{src-587b596f04f7db9c2cad3d6b87dd2b3a05de4f35.source => src.source} (100%) rename examples/packages/sources/p-16/{src-3596ea087bfdaf52380eae441077572ed289d657.source => src.source} (100%) rename examples/packages/sources/q-17/{src-ad48103e4fc71796e9708cafc43adeed0d1076b7.source => src.source} (100%) rename examples/packages/sources/r-18/{src-24b9c1f3fddff79893e5304f998f2f95ebebd149.source => src.source} (100%) rename examples/packages/sources/s-19.0/{src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source => src.source} (100%) rename examples/packages/sources/s-19.1/{src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source => src.source} (100%) rename examples/packages/sources/s-19/{src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source => src.source} (100%) rename examples/packages/sources/t-20/{src-d0758565fd06c37aa66b071160d156f5628cd518.source => src.source} (100%) rename examples/packages/sources/u-21/{src-8eecbb71d418ef8c7d583dd506a994b1bc1c3f7b.source => src.source} (100%) rename examples/packages/sources/v-22/{src-a66ca4290ebaf525721fc670ea53476a15957f9e.source => src.source} (100%) rename examples/packages/sources/w-23/{src-aec46dc0de48f39f98f9572b6560ca3f0916b715.source => src.source} (100%) rename examples/packages/sources/x-24/{src-b31990eea1cee9f421c933461a2f3c3dd741a58b.source => src.source} (100%) rename examples/packages/sources/y-25/{src-c6e4ffdb7e1f4c736fb7ab897162332b4619d9ca.source => src.source} (100%) rename examples/packages/sources/z-26/{src-a0361d509d714f50e954ffeb49ac18222609cf2a.source => src.source} (100%) diff --git a/doc/containers.md b/doc/containers.md index 52f4b4ae..63ce7ca6 100644 --- a/doc/containers.md +++ b/doc/containers.md @@ -14,10 +14,9 @@ There are some conventions regarding packages, dependencies, sources and so on. Those are listed here. 1. Dependencies are named `/inputs/-.pkg` inside the container -2. Sources are named `/inputs/src-.source` +2. Sources are named `/inputs/src.source` 3. Outputs are expected to be written to the `/outputs` directory The reason for the names lies in the artifact parsing mechanism. If the package is named differently, the artifact parsing mechanism is not able to recognize the package and might fault, which causes butido to stop running. - diff --git a/examples/packages/repo/pkg.toml b/examples/packages/repo/pkg.toml index cdd6a6ce..0cad9544 100644 --- a/examples/packages/repo/pkg.toml +++ b/examples/packages/repo/pkg.toml @@ -12,7 +12,7 @@ download_manually = false [phases] sourcecheck.script = ''' - filename="/inputs/src-{{this.sources.src.hash.hash}}.source" + filename="/inputs/src.source" [[ -e $filename ]] || { echo "MISSING: $filename" {{state "ERR" "Missing input"}} @@ -50,4 +50,3 @@ build.script = ''' {{state "OK"}} ''' - diff --git a/examples/packages/sources/a-1/src-e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e.source b/examples/packages/sources/a-1/src.source similarity index 100% rename from examples/packages/sources/a-1/src-e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e.source rename to examples/packages/sources/a-1/src.source diff --git a/examples/packages/sources/b-2/src-7448d8798a4380162d4b56f9b452e2f6f9e24e7a.source b/examples/packages/sources/b-2/src.source similarity index 100% rename from examples/packages/sources/b-2/src-7448d8798a4380162d4b56f9b452e2f6f9e24e7a.source rename to examples/packages/sources/b-2/src.source diff --git a/examples/packages/sources/c-3/src-a3db5c13ff90a36963278c6a39e4ee3c22e2a436.source b/examples/packages/sources/c-3/src.source similarity index 100% rename from examples/packages/sources/c-3/src-a3db5c13ff90a36963278c6a39e4ee3c22e2a436.source rename to examples/packages/sources/c-3/src.source diff --git a/examples/packages/sources/d-4/src-9c6b057a2b9d96a4067a749ee3b3b0158d390cf1.source b/examples/packages/sources/d-4/src.source similarity index 100% rename from examples/packages/sources/d-4/src-9c6b057a2b9d96a4067a749ee3b3b0158d390cf1.source rename to examples/packages/sources/d-4/src.source diff --git a/examples/packages/sources/e-5/src-5d9474c0309b7ca09a182d888f73b37a8fe1362c.source b/examples/packages/sources/e-5/src.source similarity index 100% rename from examples/packages/sources/e-5/src-5d9474c0309b7ca09a182d888f73b37a8fe1362c.source rename to examples/packages/sources/e-5/src.source diff --git a/examples/packages/sources/f-6/src-ccf271b7830882da1791852baeca1737fcbe4b90.source b/examples/packages/sources/f-6/src.source similarity index 100% rename from examples/packages/sources/f-6/src-ccf271b7830882da1791852baeca1737fcbe4b90.source rename to examples/packages/sources/f-6/src.source diff --git a/examples/packages/sources/g-7/src-d3964f9dad9f60363c81b688324d95b4ec7c8038.source b/examples/packages/sources/g-7/src.source similarity index 100% rename from examples/packages/sources/g-7/src-d3964f9dad9f60363c81b688324d95b4ec7c8038.source rename to examples/packages/sources/g-7/src.source diff --git a/examples/packages/sources/h-8/src-136571b41aa14adc10c5f3c987d43c02c8f5d498.source b/examples/packages/sources/h-8/src.source similarity index 100% rename from examples/packages/sources/h-8/src-136571b41aa14adc10c5f3c987d43c02c8f5d498.source rename to examples/packages/sources/h-8/src.source diff --git a/examples/packages/sources/i-9/src-b6abd567fa79cbe0196d093a067271361dc6ca8b.source b/examples/packages/sources/i-9/src.source similarity index 100% rename from examples/packages/sources/i-9/src-b6abd567fa79cbe0196d093a067271361dc6ca8b.source rename to examples/packages/sources/i-9/src.source diff --git a/examples/packages/sources/j-10/src-4143d3a341877154d6e95211464e1df1015b74bd.source b/examples/packages/sources/j-10/src.source similarity index 100% rename from examples/packages/sources/j-10/src-4143d3a341877154d6e95211464e1df1015b74bd.source rename to examples/packages/sources/j-10/src.source diff --git a/examples/packages/sources/k-11/src-dd71038f3463f511ee7403dbcbc87195302d891c.source b/examples/packages/sources/k-11/src.source similarity index 100% rename from examples/packages/sources/k-11/src-dd71038f3463f511ee7403dbcbc87195302d891c.source rename to examples/packages/sources/k-11/src.source diff --git a/examples/packages/sources/l-12/src-ad552e6dc057d1d825bf49df79d6b98eba846ebe.source b/examples/packages/sources/l-12/src.source similarity index 100% rename from examples/packages/sources/l-12/src-ad552e6dc057d1d825bf49df79d6b98eba846ebe.source rename to examples/packages/sources/l-12/src.source diff --git a/examples/packages/sources/m-13/src-feee44ad365b6b1ec75c5621a0ad067371102854.source b/examples/packages/sources/m-13/src.source similarity index 100% rename from examples/packages/sources/m-13/src-feee44ad365b6b1ec75c5621a0ad067371102854.source rename to examples/packages/sources/m-13/src.source diff --git a/examples/packages/sources/n-14/src-030514d80869744a4e2f60d2fd37d6081f5ed01a.source b/examples/packages/sources/n-14/src.source similarity index 100% rename from examples/packages/sources/n-14/src-030514d80869744a4e2f60d2fd37d6081f5ed01a.source rename to examples/packages/sources/n-14/src.source diff --git a/examples/packages/sources/o-15/src-587b596f04f7db9c2cad3d6b87dd2b3a05de4f35.source b/examples/packages/sources/o-15/src.source similarity index 100% rename from examples/packages/sources/o-15/src-587b596f04f7db9c2cad3d6b87dd2b3a05de4f35.source rename to examples/packages/sources/o-15/src.source diff --git a/examples/packages/sources/p-16/src-3596ea087bfdaf52380eae441077572ed289d657.source b/examples/packages/sources/p-16/src.source similarity index 100% rename from examples/packages/sources/p-16/src-3596ea087bfdaf52380eae441077572ed289d657.source rename to examples/packages/sources/p-16/src.source diff --git a/examples/packages/sources/q-17/src-ad48103e4fc71796e9708cafc43adeed0d1076b7.source b/examples/packages/sources/q-17/src.source similarity index 100% rename from examples/packages/sources/q-17/src-ad48103e4fc71796e9708cafc43adeed0d1076b7.source rename to examples/packages/sources/q-17/src.source diff --git a/examples/packages/sources/r-18/src-24b9c1f3fddff79893e5304f998f2f95ebebd149.source b/examples/packages/sources/r-18/src.source similarity index 100% rename from examples/packages/sources/r-18/src-24b9c1f3fddff79893e5304f998f2f95ebebd149.source rename to examples/packages/sources/r-18/src.source diff --git a/examples/packages/sources/s-19.0/src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source b/examples/packages/sources/s-19.0/src.source similarity index 100% rename from examples/packages/sources/s-19.0/src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source rename to examples/packages/sources/s-19.0/src.source diff --git a/examples/packages/sources/s-19.1/src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source b/examples/packages/sources/s-19.1/src.source similarity index 100% rename from examples/packages/sources/s-19.1/src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source rename to examples/packages/sources/s-19.1/src.source diff --git a/examples/packages/sources/s-19/src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source b/examples/packages/sources/s-19/src.source similarity index 100% rename from examples/packages/sources/s-19/src-ba9f376fa71904ccde2a756a24a4e47ec014ee0a.source rename to examples/packages/sources/s-19/src.source diff --git a/examples/packages/sources/t-20/src-d0758565fd06c37aa66b071160d156f5628cd518.source b/examples/packages/sources/t-20/src.source similarity index 100% rename from examples/packages/sources/t-20/src-d0758565fd06c37aa66b071160d156f5628cd518.source rename to examples/packages/sources/t-20/src.source diff --git a/examples/packages/sources/u-21/src-8eecbb71d418ef8c7d583dd506a994b1bc1c3f7b.source b/examples/packages/sources/u-21/src.source similarity index 100% rename from examples/packages/sources/u-21/src-8eecbb71d418ef8c7d583dd506a994b1bc1c3f7b.source rename to examples/packages/sources/u-21/src.source diff --git a/examples/packages/sources/v-22/src-a66ca4290ebaf525721fc670ea53476a15957f9e.source b/examples/packages/sources/v-22/src.source similarity index 100% rename from examples/packages/sources/v-22/src-a66ca4290ebaf525721fc670ea53476a15957f9e.source rename to examples/packages/sources/v-22/src.source diff --git a/examples/packages/sources/w-23/src-aec46dc0de48f39f98f9572b6560ca3f0916b715.source b/examples/packages/sources/w-23/src.source similarity index 100% rename from examples/packages/sources/w-23/src-aec46dc0de48f39f98f9572b6560ca3f0916b715.source rename to examples/packages/sources/w-23/src.source diff --git a/examples/packages/sources/x-24/src-b31990eea1cee9f421c933461a2f3c3dd741a58b.source b/examples/packages/sources/x-24/src.source similarity index 100% rename from examples/packages/sources/x-24/src-b31990eea1cee9f421c933461a2f3c3dd741a58b.source rename to examples/packages/sources/x-24/src.source diff --git a/examples/packages/sources/y-25/src-c6e4ffdb7e1f4c736fb7ab897162332b4619d9ca.source b/examples/packages/sources/y-25/src.source similarity index 100% rename from examples/packages/sources/y-25/src-c6e4ffdb7e1f4c736fb7ab897162332b4619d9ca.source rename to examples/packages/sources/y-25/src.source diff --git a/examples/packages/sources/z-26/src-a0361d509d714f50e954ffeb49ac18222609cf2a.source b/examples/packages/sources/z-26/src.source similarity index 100% rename from examples/packages/sources/z-26/src-a0361d509d714f50e954ffeb49ac18222609cf2a.source rename to examples/packages/sources/z-26/src.source From d34d010c6a3d7ff6e8def1cb03ad669bec022009 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 4 Apr 2024 19:57:32 +0200 Subject: [PATCH 024/150] examples/packages: Add missing dependencies and sources I forgot to add dependencies and sources for `s 19.2` and `s 19.3` when I added them as part of eae0ac5. There was also no dependency on `s 19.1` since it got introduced in 0d0ece8 (this also removes the source for `s 19` that isn't required since that commit). Signed-off-by: Michael Weiss --- examples/packages/repo/j/pkg.toml | 2 +- examples/packages/sources/{s-19 => s-19.2}/src.source | 0 examples/packages/sources/s-19.3/src.source | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) rename examples/packages/sources/{s-19 => s-19.2}/src.source (100%) create mode 100644 examples/packages/sources/s-19.3/src.source diff --git a/examples/packages/repo/j/pkg.toml b/examples/packages/repo/j/pkg.toml index b9783b21..9835f5d7 100644 --- a/examples/packages/repo/j/pkg.toml +++ b/examples/packages/repo/j/pkg.toml @@ -2,7 +2,7 @@ name = "j" version = "10" [dependencies] -runtime = ["s =19.0", "t =20"] +runtime = ["s =19.0", "s =19.1", "s =19.2", "s =19.3", "t =20"] [sources.src] url = "https://example.com" diff --git a/examples/packages/sources/s-19/src.source b/examples/packages/sources/s-19.2/src.source similarity index 100% rename from examples/packages/sources/s-19/src.source rename to examples/packages/sources/s-19.2/src.source diff --git a/examples/packages/sources/s-19.3/src.source b/examples/packages/sources/s-19.3/src.source new file mode 100644 index 00000000..d6b24041 --- /dev/null +++ b/examples/packages/sources/s-19.3/src.source @@ -0,0 +1 @@ +19 From 55920b51f46b9511d8a1877edbfe345d17165ebc Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 10 Apr 2024 12:13:26 +0200 Subject: [PATCH 025/150] Fix a crash when using ".." in the paths of patches (pkg.toml) I noticed that butido panics when attempting to build package "s =19.2" of `examples/packages/repo/`. The crash happened because `shiplift::Container::copy_file_into()` doesn't accept `..` in paths and this results in the following error: "called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: \"paths in archives must not have `..` when setting path for tmp/butido-test-repo/s/19.2\" }". I planned to normalize the relative paths of the patches anyway and this also supports reusing patches across multiple package versions via `..`. There is not stdlib implementation yet (apart from `canonicalize()`) so this did unfortunately require a custom implementation but it's luckily so simple that it should be safe (fingers crossed...). I'm using relative paths for the tests while the butido binary gets absolute paths from `git2::Repository::workdir()` [0] so I decided to support both. [0]: https://docs.rs/git2/latest/git2/struct.Repository.html#method.workdir Signed-off-by: Michael Weiss --- src/repository/repository.rs | 120 ++++++++++++++++++++++++++++++++--- 1 file changed, 111 insertions(+), 9 deletions(-) diff --git a/src/repository/repository.rs b/src/repository/repository.rs index 80f7f51e..4c2a0204 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -9,6 +9,7 @@ // use std::collections::BTreeMap; +use std::path::Component; use std::path::Path; use std::path::PathBuf; @@ -38,6 +39,74 @@ impl From> for Repository { } } +// A helper function to normalize relative Unix paths (ensures that one cannot escape using `..`): +fn normalize_relative_path(path: PathBuf) -> Result { + let mut normalized_path = PathBuf::new(); + for component in path.components() { + match component { + Component::Prefix(_) => { + // "A Windows path prefix, e.g., C: or \\server\share." + // "Does not occur on Unix." + return Err(anyhow!( + "The relative path \"{}\" starts with a Windows path prefix", + path.display() + )); + } + Component::RootDir => { + // "The root directory component, appears after any prefix and before anything else. + // It represents a separator that designates that a path starts from root." + return Err(anyhow!( + "The relative path \"{}\" starts from the root directory", + path.display() + )); + } + Component::CurDir => { + // "A reference to the current directory, i.e., `.`." + // Also (from `Path.components()`): "Occurrences of . are normalized away, except + // if they are at the beginning of the path. For example, a/./b, a/b/, a/b/. and + // a/b all have a and b as components, but ./a/b starts with an additional CurDir + // component." + // -> May only occur as the first path component and we can ignore it / normalize + // it away (we should just ensure that it's not the only path component in which + // case the path would be empty). + } + Component::ParentDir => { + // "A reference to the parent directory, i.e., `..`." + if !normalized_path.pop() { + return Err(anyhow!( + "The relative path \"{}\" uses `..` to escape the base directory", + path.display() + )); + } + } + Component::Normal(component) => { + // "A normal component, e.g., a and b in a/b. This variant is the most common one, + // it represents references to files or directories." + normalized_path.push(component); + } + } + } + + if normalized_path.parent().is_none() { + // Optional: Convert "" to ".": + normalized_path.push(Component::CurDir); + } + + Ok(normalized_path) +} + +// A helper function to normalize paths (absolute paths are normalized by normalizing only the +// relative path after the "base" prefix to ensure one cannot use `..` to move above "base"): +fn normalize_path(path: PathBuf, base: &PathBuf) -> Result { + if path.is_absolute() { + let relpath = path.strip_prefix(base)?; + let relpath = normalize_relative_path(relpath.to_owned())?; + Ok(base.join(relpath)) + } else { + normalize_relative_path(path) + } +} + impl Repository { fn new(inner: BTreeMap<(PackageName, PackageVersion), Package>) -> Self { Repository { inner } @@ -76,6 +145,7 @@ impl Repository { } } + let cwd = std::env::current_dir()?; let leaf_files = fsr .files() .par_iter() @@ -115,7 +185,7 @@ impl Repository { .into_iter() // Prepend the path of the directory of the `pkg.toml` file to the name of the patch: .map(|p| if let Some(current_dir) = path.parent() { - Ok(current_dir.join(p)) + normalize_path(current_dir.join(p), &cwd) } else { Err(anyhow!("Path should point to path with parent, but doesn't: {}", path.display())) }) @@ -125,11 +195,11 @@ impl Repository { .and_then_ok(|patch| if patch.exists() { Ok(Some(patch)) } else { - Err(anyhow!("Patch does not exist: {}", patch.display())) - .with_context(|| anyhow!("The patch is declared here: {}", path.display())) + Err(anyhow!("The following patch does not exist: {}", patch.display())) }) .filter_map_ok(|o| o) - .collect::>>()? + .collect::>>() + .with_context(|| anyhow!("Could not process the patches declared here: {}", path.display()))? }; trace!("Patches after postprocessing merge: {:?}", patches); @@ -319,7 +389,8 @@ pub mod tests { assert_pkg(&repo, "s", "19.1"); assert_pkg(&repo, "z", "26"); - // Verify the paths of the patches (and "merging"): + // Verify the paths of the patches (and the base directory "merging"/joining logic plus the + // normalization of relative paths): // The patches are defined as follows: // s/pkg.toml: patches = [ "./foo.patch" ] // s/19.0/pkg.toml: patches = ["./foo.patch","s190.patch"] @@ -327,11 +398,10 @@ pub mod tests { // s/19.2/pkg.toml: patches = ["../foo.patch"] // s/19.3/pkg.toml: patches = ["s190.patch"] let p = get_pkg(&repo, "s", "19.0"); - // Ideally we'd normalize the `./` away: assert_eq!( p.patches(), &vec![ - PathBuf::from("examples/packages/repo/s/19.0/./foo.patch"), + PathBuf::from("examples/packages/repo/s/19.0/foo.patch"), PathBuf::from("examples/packages/repo/s/19.0/s190.patch") ] ); @@ -341,10 +411,9 @@ pub mod tests { &vec![PathBuf::from("examples/packages/repo/s/foo.patch")] ); let p = get_pkg(&repo, "s", "19.2"); - // We might want to normalize the `19.2/../` away: assert_eq!( p.patches(), - &vec![PathBuf::from("examples/packages/repo/s/19.2/../foo.patch")] + &vec![PathBuf::from("examples/packages/repo/s/foo.patch")] ); let p = get_pkg(&repo, "s", "19.3"); assert_eq!( @@ -354,4 +423,37 @@ pub mod tests { Ok(()) } + + #[test] + fn test_relative_path_normalization() -> Result<()> { + assert!(normalize_relative_path(PathBuf::from("/root")).is_err()); + assert!(normalize_relative_path(PathBuf::from("a/../../root")).is_err()); + assert_eq!( + normalize_relative_path(PathBuf::from(""))?, + PathBuf::from(".") + ); + assert_eq!( + normalize_relative_path(PathBuf::from("."))?, + PathBuf::from(".") + ); + assert_eq!( + normalize_relative_path(PathBuf::from("./a//b/../b/./c/."))?, + PathBuf::from("a/b/c") + ); + assert_eq!( + normalize_relative_path(PathBuf::from("./a//../b/"))?, + PathBuf::from("b") + ); + + assert!(normalize_path(PathBuf::from("/root"), &PathBuf::from("/foo/bar")).is_err()); + assert_eq!( + normalize_path( + PathBuf::from("/.//foo/bar//baz/../baz/./"), + &PathBuf::from("/foo/bar") + )?, + PathBuf::from("/foo/bar/baz") + ); + + Ok(()) + } } From 97f0cee837d41926cdecaf4a89afbedcd8c4587a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 11 Apr 2024 14:14:27 +0200 Subject: [PATCH 026/150] Ensure that relative paths for patches are used internally The rest of the code that processes custom package patches (defined in `pkg.toml`) only works correctly when using relative paths. I noticed this issue [0] when attempting to build the packages in `examples/packages/repo/` which resulted in the following build error: ``` $ butido db log-of 6116589e-471d-4b80-b446-1fd028e82623 Does not exist: /patches//tmp/butido-test-repo/s/19.0/foo.patch ``` The tracing output reveals the issue: "Copying patch /tmp/butido-test-repo/s/19.0/foo.patch to container at /tmp/butido-test-repo/s/19.0/foo.patch" The second path should be prefixed with "/patches/" but that didn't work because `path1.join(path2)` results in just `path2` if the latter is an absolute path. I decided to simply switch to relative paths for now as the path to the `pkg.toml` repo shouldn't get "leaked" into the containers anyway, at least IMO. Those relative paths should be good enough for now and still guarantee that there won't be name collisions (vs. when only using the file name of the patch). [0]: This issue must be a regression but I'm not sure how old the regression is as a quick look didn't reveal it's source and it could even come from dependency updates (the absolute paths come from `git2`). One could use git-bisect but I didn't bother yet. Signed-off-by: Michael Weiss --- src/repository/repository.rs | 43 +++++++++++++++++------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/src/repository/repository.rs b/src/repository/repository.rs index 4c2a0204..eb3fc356 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -95,18 +95,6 @@ fn normalize_relative_path(path: PathBuf) -> Result { Ok(normalized_path) } -// A helper function to normalize paths (absolute paths are normalized by normalizing only the -// relative path after the "base" prefix to ensure one cannot use `..` to move above "base"): -fn normalize_path(path: PathBuf, base: &PathBuf) -> Result { - if path.is_absolute() { - let relpath = path.strip_prefix(base)?; - let relpath = normalize_relative_path(relpath.to_owned())?; - Ok(base.join(relpath)) - } else { - normalize_relative_path(path) - } -} - impl Repository { fn new(inner: BTreeMap<(PackageName, PackageVersion), Package>) -> Self { Repository { inner } @@ -183,9 +171,27 @@ impl Repository { // `path` is only available in this "iteration". patches_after_merge .into_iter() - // Prepend the path of the directory of the `pkg.toml` file to the name of the patch: .map(|p| if let Some(current_dir) = path.parent() { - normalize_path(current_dir.join(p), &cwd) + // Prepend the path of the directory of the `pkg.toml` file to + // the name of the patch file: + let mut path = current_dir.join(p); + // Ensure that we use relative paths for the patches (the rest + // of the code that uses the patches doesn't work correctly + // with absolute paths): + if path.is_absolute() { + // We assume that cwd is part of the prefix (currently, the + // path comes from `git2::Repository::workdir()` and should + // always be absolute and start from cwd so this is fine): + path = path + .strip_prefix(&cwd) + .map(|p| p.to_owned()) + .with_context(|| anyhow!("Cannot strip the prefix {} form path {}", cwd.display(), current_dir.display()))?; + } + if path.is_absolute() { + Err(anyhow!("The path {} is absolute but it should be a relative path.", path.display())) + } else { + normalize_relative_path(path) + } } else { Err(anyhow!("Path should point to path with parent, but doesn't: {}", path.display())) }) @@ -445,15 +451,6 @@ pub mod tests { PathBuf::from("b") ); - assert!(normalize_path(PathBuf::from("/root"), &PathBuf::from("/foo/bar")).is_err()); - assert_eq!( - normalize_path( - PathBuf::from("/.//foo/bar//baz/../baz/./"), - &PathBuf::from("/foo/bar") - )?, - PathBuf::from("/foo/bar/baz") - ); - Ok(()) } } From 45f8075a6fc99ef2c27b061eddb22c9537bd5385 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 11 Apr 2024 21:16:36 +0200 Subject: [PATCH 027/150] Bump the butido version to 0.5.0 We'll probably release version 1.0.0 soon as we're using butido in production for quite a while now. Signed-off-by: Michael Weiss --- CHANGELOG.md | 2 ++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11f44f59..232160ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ is too old (i.e., must be updated). ## Upcoming +## v0.5.0 + ### Major/Breaking changes * The configuration must be updated, see `CHANGELOG.toml` for details. diff --git a/Cargo.lock b/Cargo.lock index d7c23304..5376c1c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,7 +208,7 @@ checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "butido" -version = "0.4.0" +version = "0.5.0" dependencies = [ "anyhow", "aquamarine", diff --git a/Cargo.toml b/Cargo.toml index 96652004..fcc005bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "butido" -version = "0.4.0" +version = "0.5.0" authors = [ # Only for the current/active maintainers (sorted alphabetically by the surname) # All other authors are listed in the "Authors" section of README.md From 78a815313005149d981a264940d7fcb589d7648c Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Apr 2024 16:48:55 +0200 Subject: [PATCH 028/150] Complete the changelog for butido 0.5.0 I went over the commits since 0.4.0 and documented the relevant changes. Signed-off-by: Michael Weiss --- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 232160ee..6129a7bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,47 @@ is too old (i.e., must be updated). ### Major/Breaking changes * The configuration must be updated, see `CHANGELOG.toml` for details. + * The `compatibility` setting is now independent of the butido version and + will be used to output the required configuration changes +* Butido now rejects unknown fields in its configuration source(s) + (`config.toml` files and environment variables) and package definitions + (`pkg.toml` files). This is done to detect typos/mistakes and requires + changes if such unknown/misspelled fields are present. +* The "merging" of `patches` arrays in `pkg.toml` files has been fixed (the old + logic silently ignored a patch if a patch with the same name was declared in + an upper level/layer `pkg.toml` file) + +### Highlights + +* Lots of dependency updates (including security updates) + * All dependencies are up-to-date now (except for the `config` crate due to + breaking changes in `0.14.x` that currently prevent us from updating) + * Some deprecated/unmaintained crates have been replaced or dropped +* CLI improvements and fixes (partly due to the clap update from version 3 to 4) + * Better / more consistent argument parsing + * Output tweaks/improvements + * Improved error messages (e.g., for dependency cycles and unsupported + version specifications) + * Support for short build image names + * More filtering options for DB commands + * Build dependencies are now marked with a star (`*`) in the `tree-of` output + * A new "release list" subcommand ("db releases" alias for convenience) +* Fixed the default log level (info -> warn) +* Source download improvements (warnings when downloading HTML files, no more + empty source files after failed downloads, a check for the HTTP status code + to avoid downloading "404 Not Found" HTML responses, and the User-Agent + header is now set) +* The included example configuration and packages repo have been fixed (and new + CI tests should ensure that they remain valid) +* It is now possible to depend on packages whose name starts with a number +* The tracing has been improved (some spans and structured fields are now used) + and the `--tracing-chrome` flag has been added to generate `chrome://tracing` + compatible JSON files +* Butido no longer crashes when `..` is used in paths of `patches` (`pkg.toml`) +* Lots of cleanups, refactorings, new tests (+ CI improvements), and minor fixes +* Various minor improvements (additional directory/filesystem checks, handling + of multiple release stores, etc.) +* Minor documentation improvements (typos, fixes, additional comments, etc.) ## v0.4.0 From 53de218d1941c3ecd45c623e7570e9eb8ff3d83c Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 22 Apr 2024 18:18:36 +0200 Subject: [PATCH 029/150] Fix typos in comments, documentation, and output I used Vim's spell checker to catch quite a few typos (hopefully most of the relevant ones but an advanced spell/grammar checker could likely catch quite a few more). Signed-off-by: Michael Weiss --- src/cli.rs | 48 ++++++++++++++++---------------- src/commands/build.rs | 2 +- src/commands/db.rs | 2 +- src/commands/find_artifact.rs | 2 +- src/config/container_config.rs | 6 ++-- src/db/find_artifacts.rs | 2 +- src/endpoint/configured.rs | 4 +-- src/filestore/path.rs | 4 +-- src/main.rs | 2 +- src/orchestrator/orchestrator.rs | 14 +++++----- src/repository/fs/path.rs | 2 +- src/util/filters.rs | 8 ++++-- 12 files changed, 50 insertions(+), 46 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index f3c9c300..7000773d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -58,7 +58,7 @@ pub fn cli() -> Command { .after_help(indoc::indoc!(r#" The following environment variables can be passed to butido: - RUST_LOG - to enable logging, for exact usage see the rust cookbook + RUST_LOG - to enable logging, for exact usage see the Rust cookbook "#)) .arg(Arg::new("version") @@ -73,7 +73,7 @@ pub fn cli() -> Command { .action(ArgAction::SetTrue) .required(false) .long("tracing-chrome") - .help("Generate a chrome compatible trace file") + .help("Generate a Chrome compatible trace file (trace-*.json)") ) .arg(Arg::new("hide_bars") @@ -90,7 +90,7 @@ pub fn cli() -> Command { .help("Override the database host") .long_help(indoc::indoc!(r#" Override the database host set via configuration. - Can also be overriden via environment variable 'BUTIDO_DATABASE_HOST', but this setting has precedence. + Can also be overridden via environment variable 'BUTIDO_DATABASE_HOST', but this setting has precedence. "#)) ) .arg(Arg::new("database_port") @@ -100,7 +100,7 @@ pub fn cli() -> Command { .help("Override the database port") .long_help(indoc::indoc!(r#" Override the database port set via configuration. - Can also be overriden via environment 'BUTIDO_DATABASE_PORT', but this setting has precedence. + Can also be overridden via environment 'BUTIDO_DATABASE_PORT', but this setting has precedence. "#)) ) .arg(Arg::new("database_user") @@ -110,7 +110,7 @@ pub fn cli() -> Command { .help("Override the database user") .long_help(indoc::indoc!(r#" Override the database user set via configuration. - Can also be overriden via environment 'BUTIDO_DATABASE_USER', but this setting has precedence. + Can also be overridden via environment 'BUTIDO_DATABASE_USER', but this setting has precedence. "#)) ) .arg(Arg::new("database_password") @@ -121,7 +121,7 @@ pub fn cli() -> Command { .help("Override the database password") .long_help(indoc::indoc!(r#" Override the database password set via configuration. - Can also be overriden via environment 'BUTIDO_DATABASE_PASSWORD', but this setting has precedence. + Can also be overridden via environment 'BUTIDO_DATABASE_PASSWORD', but this setting has precedence. "#)) ) .arg(Arg::new("database_name") @@ -131,7 +131,7 @@ pub fn cli() -> Command { .help("Override the database name") .long_help(indoc::indoc!(r#" Override the database name set via configuration. - Can also be overriden via environment 'BUTIDO_DATABASE_NAME', but this setting has precedence. + Can also be overridden via environment 'BUTIDO_DATABASE_NAME', but this setting has precedence. "#)) ) .arg(Arg::new("database_connection_timeout") @@ -141,7 +141,7 @@ pub fn cli() -> Command { .help("Override the database connection timeout") .long_help(indoc::indoc!(r#" Override the database connection timeout set via configuration. - Can also be overriden via environment 'BUTIDO_DATABASE_CONNECTION_TIMEOUT', but this setting has precedence. + Can also be overridden via environment 'BUTIDO_DATABASE_CONNECTION_TIMEOUT', but this setting has precedence. "#)) ) @@ -511,7 +511,7 @@ pub fn cli() -> Command { ) .subcommand(Command::new("dependencies-of") .alias("depsof") - .about("List the depenendcies of a package") + .about("List the dependencies of a package") .arg(Arg::new("package_name") .required(true) .index(1) @@ -522,7 +522,7 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), E.G. '=1.0.0'") + .help("A version constraint to search for (optional), e.g., '=1.0.0'") ) .arg(Arg::new("dependency_type") .required(false) @@ -564,7 +564,7 @@ pub fn cli() -> Command { .required(true) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), E.G. '=1.0.0'") + .help("A version constraint to search for (optional), e.g., '=1.0.0'") ) ) @@ -580,21 +580,21 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), E.G. '=1.0.0'") + .help("A version constraint to search for (optional), e.g., '=1.0.0'") ) .arg(Arg::new("no_script_filter") .action(ArgAction::SetTrue) .long("no-script-filter") .short('S') .required(false) - .help("Don't check for script equality. Can cause unexact results.") + .help("Don't check for script equality. Can cause inexact results.") ) .arg(Arg::new("staging_dir") .required(false) .long("staging-dir") .value_name("PATH") .value_parser(dir_exists_validator) - .help("Also consider this staging dir when searching for artifacts") + .help("Also consider this staging directory when searching for artifacts") ) .arg(Arg::new("env_filter") .required(false) @@ -626,7 +626,7 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), E.G. '=1.0.0'") + .help("A version constraint to search for (optional), e.g., '=1.0.0'") ) .arg(Arg::new("terse") @@ -825,18 +825,18 @@ pub fn cli() -> Command { ) ) .subcommand(Command::new("of") - .about("Get the pathes of the sources of a package") + .about("Get the paths of the sources of a package") .arg(Arg::new("package_name") .required(false) .index(1) .value_name("PKG") - .help("Get the source file pathes for this package") + .help("Get the source file paths for this package") ) .arg(Arg::new("package_version") .required(false) .index(2) .value_name("VERSION") - .help("Get the source file pathes for the package in this version") + .help("Get the source file paths for the package in this version") ) ) ) @@ -927,7 +927,7 @@ pub fn cli() -> Command { .action(ArgAction::SetTrue) .required(false) .long("non-interactive") - .help("Dont be interactive (only with --update at the moment)") + .help("Don't be interactive (only with --update at the moment)") .requires("package_do_update") ) .arg(Arg::new("quiet") @@ -935,7 +935,7 @@ pub fn cli() -> Command { .required(false) .long("quiet") .short('q') - .help("Don't print pathes to released filesfiles after releases are complete") + .help("Don't print the paths to released files after releases are complete") ) ) @@ -953,7 +953,7 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), E.G. '=1.0.0'") + .help("A version constraint to search for (optional), e.g., '=1.0.0'") ) ) @@ -969,7 +969,7 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), E.G. '=1.0.0'") + .help("A version constraint to search for (optional), e.g., '=1.0.0'") ) .arg(Arg::new("image") .required(false) @@ -1005,7 +1005,7 @@ pub fn cli() -> Command { ) .subcommand(Command::new("endpoint") - .about("Endpoint maintentance commands") + .about("Endpoint maintenance commands") .arg(Arg::new("endpoint_name") .required(false) .index(1) @@ -1251,7 +1251,7 @@ fn env_pass_validator(s: &str) -> Result { Err(s) } Ok((k, v)) => { - debug!("Env pass valiation: '{}={}'", k, v); + debug!("Env pass validation: '{}={}'", k, v); Ok(s.to_owned()) } } diff --git a/src/commands/build.rs b/src/commands/build.rs index ff7049cd..171fe689 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -116,7 +116,7 @@ pub async fn build( }) .collect::>(); { - // Because we're loading always sequencially, to have a bit more spread over the endpoints, + // Because we're loading always sequentially, to have a bit more spread over the endpoints, // shuffle the endpoints here. Not a perfect solution, but a working one. use rand::seq::SliceRandom; let mut rng = rand::thread_rng(); diff --git a/src/commands/db.rs b/src/commands/db.rs index a3a92b1b..8056316d 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -660,7 +660,7 @@ fn job( let parsed_log = crate::log::ParsedLog::from_str(&data.0.log_text)?; trace!("Parsed log = {:?}", parsed_log); let success = parsed_log.is_successfull(); - trace!("log successfull = {:?}", success); + trace!("log successful = {:?}", success); if csv { let hdrs = crate::commands::util::mk_header(vec![ diff --git a/src/commands/find_artifact.rs b/src/commands/find_artifact.rs index a48b8a1d..dd6d0724 100644 --- a/src/commands/find_artifact.rs +++ b/src/commands/find_artifact.rs @@ -163,7 +163,7 @@ pub async fn find_artifact( ((a, None), (b, None)) => a.cmp(b), } }) - .unique_by(|tpl| tpl.0.clone()) // TODO: Dont clone() + .unique_by(|tpl| tpl.0.clone()) // TODO: Don't clone() .try_for_each(|(path, releasetime)| { if let Some(time) = releasetime { writeln!(std::io::stdout(), "[{}] {}", time, path.display()) diff --git a/src/config/container_config.rs b/src/config/container_config.rs index 702d1009..094ce541 100644 --- a/src/config/container_config.rs +++ b/src/config/container_config.rs @@ -25,12 +25,12 @@ pub struct ContainerConfig { #[getset(get = "pub")] allowed_env: Vec, - /// Pass the current git author to the container - /// This can be used to the the "packager" name in a package, for example + /// Pass the current Git author to the container + /// This can be used for the "packager" name in a package, for example #[getset(get = "pub")] git_author: Option, - /// Pass the current git hash to the container + /// Pass the current Git hash to the container #[getset(get = "pub")] git_commit_hash: Option, } diff --git a/src/db/find_artifacts.rs b/src/db/find_artifacts.rs index 433570d6..d00bd5c8 100644 --- a/src/db/find_artifacts.rs +++ b/src/db/find_artifacts.rs @@ -50,7 +50,7 @@ use crate::util::EnvironmentVariableName; /// /// If the artifact was released, the return value contains a Some(NaiveDateTime), marking the date /// of the release. -/// Releases are returned prefferably, if multiple equal pathes for an artifact are found. +/// Releases are returned preferably, if multiple equal paths for an artifact are found. #[derive(typed_builder::TypedBuilder)] pub struct FindArtifacts<'a> { config: &'a Configuration, diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index 035da583..71330f27 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -181,7 +181,7 @@ impl Endpoint { .with_context(|| anyhow!("Getting API version of endpoint: {}", ep.name))?; if !v.contains(&avail.api_version) { - Err(anyhow!("Incompatible Docker API version on endpoint {}: Exepected: {}, Available: [{}]", + Err(anyhow!("Incompatible Docker API version on endpoint {}: Expected: {}, Available: [{}]", ep.name(), avail.api_version, v.join(", "))) } else { Ok(()) @@ -653,7 +653,7 @@ impl<'a> PreparedContainer<'a> { .copy_file_into(destination, &buf) .await .map_err(Error::from) - .inspect(|_| trace!("Copying patch {} successfull", patch.display())) + .inspect(|_| trace!("Copying patch {} successful", patch.display())) .with_context(|| { anyhow!( "Copying patch {} to container {}", diff --git a/src/filestore/path.rs b/src/filestore/path.rs index e8859594..9c3ff6ce 100644 --- a/src/filestore/path.rs +++ b/src/filestore/path.rs @@ -104,9 +104,9 @@ impl StoreRoot { /// Unpack a tar archive in this location /// /// This function unpacks the provided tar archive "butido-style" in the location pointed to by - /// `self` and returns the written pathes. + /// `self` and returns the written paths. /// - /// The function filteres out the "/output" directory (that's what is meant by "butido-style"). + /// The function filters out the "/output" directory (that's what is meant by "butido-style"). pub(in crate::filestore) fn unpack_archive_here( &self, mut ar: tar::Archive, diff --git a/src/main.rs b/src/main.rs index 166f63fd..cdcc6376 100644 --- a/src/main.rs +++ b/src/main.rs @@ -127,7 +127,7 @@ async fn main() -> Result<()> { let repo = git2::Repository::open(PathBuf::from(".")).map_err(|e| match e.code() { git2::ErrorCode::NotFound => { - eprintln!("Butido must be executed in the top-level of the git repository"); + eprintln!("Butido must be executed in the top-level of the Git repository"); std::process::exit(1) } _ => Error::from(e), diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 03fda41c..8dd218f9 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -541,7 +541,7 @@ struct JobTask<'a> { /// /// This implementation is a bit of a hack. /// Because all `JobTask`s are `JobTask::run()` in parallel, but there is no IPC _between_ the -/// tasks (there is IPC between childs and parents, but not between all JobTask objects), we never +/// tasks (there is IPC between children and parents, but not between all JobTask objects), we never /// know whether any other task errored when the JobTask object is destructed. /// /// One way to implement this would be to add multi-cast IPC between all `JobTask` objects, with some @@ -560,7 +560,7 @@ impl<'a> Drop for JobTask<'a> { // If there are dependencies, the error is probably from another task // If there are no dependencies, the error was caused by something else let errmsg = if self.jobdef.dependencies.is_empty() { - "error occured" + "error occurred" } else { "error on other task" }; @@ -610,7 +610,7 @@ impl<'a> JobTask<'a> { /// Run the job /// - /// This function runs the job from this object on the scheduler as soon as all dependend jobs + /// This function runs the job from this object on the scheduler as soon as all dependent jobs /// returned successfully. async fn run(mut self) -> Result<()> { debug!(job_uuid = %self.jobdef.job.uuid(), "Running"); @@ -748,7 +748,7 @@ impl<'a> JobTask<'a> { // subcommand. In this case, there might be an artifact for this job in the // staging store. In this case, we want to use it as a replacement, of course. // - // The fact that released artifacts are returned prefferably from this function + // The fact that released artifacts are returned preferably from this function // call does not change anything, because if there is an artifact that's a released // one that matches this job, we should use it anyways. .staging_store(Some(&staging_store)) @@ -778,7 +778,7 @@ impl<'a> JobTask<'a> { }) // We don't need duplicates here, so remove them by making the iterator unique // If we have two artifacts that are the same, the one in the staging store will be - // preffered in the next step + // preferred in the next step .unique_by(|tpl| tpl.0.artifact_path().clone()) // Fetch the artifact from the staging store, if there is one. // If there is none, try the release store. @@ -914,7 +914,7 @@ impl<'a> JobTask<'a> { Ok(()) } - /// Performe a recv() call on the receiving side of the channel + /// Perform a recv() call on the receiving side of the channel /// /// Put the dependencies you received into the `received_dependencies`, the errors in the /// `received_errors` @@ -977,7 +977,7 @@ impl<'a> JobTask<'a> { if !missing_deps.is_empty() { let missing: Vec = missing_deps.iter().map(|u| u.to_string()).collect(); Err(anyhow!( - "Childs finished, but dependencies still missing: {:?}", + "Children finished, but dependencies still missing: {:?}", missing )) } else { diff --git a/src/repository/fs/path.rs b/src/repository/fs/path.rs index b5afa583..73fa44cd 100644 --- a/src/repository/fs/path.rs +++ b/src/repository/fs/path.rs @@ -13,7 +13,7 @@ use std::path::Component; use anyhow::anyhow; use anyhow::Result; -/// Helper type for filtering for pathes we need or dont need +/// Helper type for filtering for paths we need or don't need /// /// We either have a directory, which has a name, or we have a pkg.toml file, which is of interest. /// All other files can be ignored and thus are not represented by this type. diff --git a/src/util/filters.rs b/src/util/filters.rs index 2139188c..ff32b288 100644 --- a/src/util/filters.rs +++ b/src/util/filters.rs @@ -27,7 +27,11 @@ pub fn build_package_filter_by_dependency_name( ) -> impl filters::failable::filter::FailableFilter { let n = name.clone(); // clone, so we can move into closure let filter_build_dep = move |p: &Package| -> Result { - trace!("Checking whether any build depenency of {:?} is '{}'", p, n); + trace!( + "Checking whether any build dependency of {:?} is '{}'", + p, + n + ); Ok({ check_build_dep && p.dependencies() @@ -46,7 +50,7 @@ pub fn build_package_filter_by_dependency_name( let n = name.clone(); // clone, so we can move into closure let filter_rt_dep = move |p: &Package| -> Result { trace!( - "Checking whether any runtime depenency of {:?} is '{}'", + "Checking whether any runtime dependency of {:?} is '{}'", p, n ); From 7f6936cf885ce6b5f5b3ff55583f7bed5a97f2b5 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 30 Apr 2024 15:14:30 +0200 Subject: [PATCH 030/150] Restore the sorting order and version specification in Cargo.toml This only fixes a minor divergence from our conventions. Signed-off-by: Michael Weiss --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fcc005bf..3a853224 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,8 +71,8 @@ tokio = { version = "1", features = ["macros", "fs", "process", "io-util", "time tokio-stream = "0.1" toml = "0.8" tracing = "0.1" +tracing-chrome = "0.7" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -tracing-chrome = "0.7.1" typed-builder = "0.18" unindent = "0.2" url = { version = "2", features = ["serde"] } From d9289913306810c6ff661b1c0b003bf21b8ffb5d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 30 Apr 2024 15:17:59 +0200 Subject: [PATCH 031/150] Drop an old clippy exception for rustc 1.75 This isn't required anymore since the latest MSRV bump in 786404d. Signed-off-by: Michael Weiss --- src/job/runnable.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/job/runnable.rs b/src/job/runnable.rs index f36feffe..de06da4c 100644 --- a/src/job/runnable.rs +++ b/src/job/runnable.rs @@ -50,9 +50,6 @@ pub struct RunnableJob { } impl RunnableJob { - // TODO: Drop the following clippy exception once we don't need to check against rustc 1.75 - // anymore (a fix was already merged but it likely won't be backported to 1.75): - #[allow(clippy::map_identity)] pub fn build_from_job( job: &Job, source_cache: &SourceCache, From 641721d45c78bf5bf8dcf2ae5741eb940295cb38 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 30 Apr 2024 16:07:59 +0200 Subject: [PATCH 032/150] Output the IDs of endpoints and container images (endpoint subcommand) This is basically a quickfix for our `cargo check` CI test against the beta toolchain that reported that those two fields don't need `pub` as they're never accessed from outside the module. Alternatives would be to drop `pub` or add an `#[allow(dead_code)]` exception but outputting the IDs might actually be for the best (they're normally not that relevant but could be useful, e.g., when interacting with the DB). The main problem is that the `butido endpoint containers list` output becomes too wide and the IDs get truncated but ideally we'd try to shorten the IDs anyway (the only problem is ensuring that they remain locally unique...). Signed-off-by: Michael Weiss --- src/commands/endpoint.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index 000bd310..6d86bbe3 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -140,6 +140,7 @@ async fn stats( "Name", "Containers", "Images", + "Id", "Kernel", "Memory", "Memory limit", @@ -173,6 +174,7 @@ async fn stats( stat.name, stat.containers.to_string(), stat.images.to_string(), + stat.id.to_string(), stat.kernel_version, bytesize::ByteSize::b(stat.mem_total).to_string(), stat.memory_limit.to_string(), @@ -213,7 +215,15 @@ async fn containers_list( let newer_than_filter = crate::commands::util::get_date_filter("newer_than", matches)?; let csv = matches.get_flag("csv"); let hdr = crate::commands::util::mk_header( - ["Endpoint", "Container id", "Image", "Created", "Status"].to_vec(), + [ + "Endpoint", + "Container id", + "Image", + "Image id", + "Created", + "Status", + ] + .to_vec(), ); let data = connect_to_endpoints(config, &endpoint_names) @@ -247,10 +257,12 @@ async fn containers_list( .unwrap_or(true) }) .map(|stat| { + // TODO: The output can become too wide (we should, e.g., try to shorten the IDs): vec![ endpoint_name.as_ref().to_owned(), stat.id, stat.image, + stat.image_id, stat.created.to_string(), stat.status, ] From e739f8165267d58a56e6a54feca4ef2a9ba961d4 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 30 Apr 2024 15:33:58 +0200 Subject: [PATCH 033/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 320 +++++++++++++++++++++++++++++------------------------ 1 file changed, 175 insertions(+), 145 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7c23304..48dbdc09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "aquamarine" @@ -106,7 +106,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -117,13 +117,13 @@ checksum = "3c2bee9b9ee0e5768772e38c07ef0ba23a490d7e1336ec7207c25712a2661c55" [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -159,6 +159,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "bincode" version = "1.3.3" @@ -202,9 +208,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "butido" @@ -328,12 +334,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -344,9 +351,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -354,7 +361,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -380,9 +387,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "885e4d7d5af40bfb99ae6f9433e292feac98d452dcb3ec3d25dfe7552b77da8c" +checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" dependencies = [ "clap", ] @@ -560,9 +567,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.1.5" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fc05c17098f21b89bc7d98fe1dd3cce2c11c2ad8e145f2a44fe08ed28eb559" +checksum = "ff236accb9a5069572099f0b350a92e9560e8e63a9b8d546162f4a5e03026bb2" dependencies = [ "bitflags 2.5.0", "byteorder", @@ -577,14 +584,14 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d02eecb814ae714ffe61ddc2db2dd03e6c49a42e269b5001355500d431cce0c" +checksum = "14701062d6bed917b5c7103bdffaee1e4609279e240488ad24e7bd979ca6866c" dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -604,7 +611,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -619,9 +626,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "encode_unicode" @@ -631,9 +638,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -656,9 +663,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "filetime" @@ -668,7 +675,7 @@ checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "windows-sys 0.52.0", ] @@ -686,9 +693,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -780,7 +787,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -837,9 +844,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -920,9 +927,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hermit-abi" @@ -1060,9 +1067,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes 1.6.0", "futures-channel", @@ -1104,7 +1111,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes 1.6.0", "http-body-util", - "hyper 1.2.0", + "hyper 1.3.1", "hyper-util", "native-tls", "tokio", @@ -1123,7 +1130,7 @@ dependencies = [ "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.2.0", + "hyper 1.3.1", "pin-project-lite", "socket2", "tokio", @@ -1267,9 +1274,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] @@ -1291,9 +1298,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libgit2-sys" @@ -1364,9 +1371,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1584,7 +1591,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -1624,9 +1631,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", "parking_lot_core", @@ -1634,15 +1641,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -1667,7 +1674,7 @@ dependencies = [ "regex", "regex-syntax 0.8.3", "structmeta", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -1713,7 +1720,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -1774,7 +1781,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -1871,9 +1878,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -1898,9 +1905,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1975,6 +1982,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "regex" version = "1.10.4" @@ -2021,11 +2037,11 @@ checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d66674f2b6fb864665eea7a3c1ac4e3dfacd2fda83cf6f935a612e01b0e3338" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ - "base64 0.21.7", + "base64 0.22.0", "bytes 1.6.0", "encoding_rs", "futures-core", @@ -2034,7 +2050,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.2.0", + "hyper 1.3.1", "hyper-tls", "hyper-util", "ipnet", @@ -2086,9 +2102,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", @@ -2099,18 +2115,25 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ - "base64 0.21.7", + "base64 0.22.0", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" + [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "ryu" @@ -2185,29 +2208,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", @@ -2301,9 +2324,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -2325,9 +2348,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2335,9 +2358,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "structmeta" @@ -2348,7 +2371,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -2359,7 +2382,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -2375,9 +2398,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.57" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -2468,22 +2491,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -2498,9 +2521,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -2521,9 +2544,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -2570,7 +2593,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -2650,7 +2673,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.9", + "toml_edit 0.22.12", ] [[package]] @@ -2677,15 +2700,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.5", + "winnow 0.6.7", ] [[package]] @@ -2736,14 +2759,14 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] name = "tracing-chrome" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496b3cd5447f7ff527bbbf19b071ad542a000adf297d4127078b4dfdb931f41a" +checksum = "bf0a738ed5d6450a9fb96e86a23ad808de2b727fd1394585da5cdd6788ffe724" dependencies = [ "serde_json", "tracing-core", @@ -2797,22 +2820,22 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typed-builder" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444d8748011b93cb168770e8092458cb0f8854f931ff82fdf6ddfbd72a9c933e" +checksum = "77739c880e00693faef3d65ea3aad725f196da38b22fdc7ea6ded6e1ce4d3add" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563b3b88238ec95680aef36bdece66896eaa7ce3c0f1b4f39d38fb2435261352" +checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", ] [[package]] @@ -2850,9 +2873,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unindent" @@ -2966,7 +2989,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", "wasm-bindgen-shared", ] @@ -3000,7 +3023,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3064,11 +3087,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3083,7 +3106,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -3101,7 +3124,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -3121,17 +3144,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -3142,9 +3166,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -3154,9 +3178,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -3166,9 +3190,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -3178,9 +3208,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -3190,9 +3220,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -3202,9 +3232,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -3214,9 +3244,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -3229,18 +3259,18 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", From 43bcbf6785480509e04dfd730a251b14e9e03282 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 13:03:34 +0000 Subject: [PATCH 034/150] build(deps): bump human-panic from 1.2.3 to 2.0.0 Bumps [human-panic](https://github.com/rust-cli/human-panic) from 1.2.3 to 2.0.0. - [Changelog](https://github.com/rust-cli/human-panic/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-cli/human-panic/compare/v1.2.3...v2.0.0) --- updated-dependencies: - dependency-name: human-panic dependency-type: direct:production update-type: version-update:semver-major ... --- `Metadata`s fields are now private so we have to switch to the setters. Signed-off-by: dependabot[bot] Co-authored-by: Michael Weiss --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/main.rs | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f81bdf6..6d0a3c1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1022,9 +1022,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "human-panic" -version = "1.2.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f016c89920bbb30951a8405ecacbb4540db5524313b9445736e7e1855cf370" +checksum = "a4c5d0e9120f6bca6120d142c7ede1ba376dd6bf276d69dd3dbe6cbeb7824179" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 3a853224..c3138736 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ futures = "0.3" getset = "0.1" git2 = "0.18" handlebars = { version = "5", features = ["no_logging"] } -human-panic = "1" +human-panic = "2" humantime = "2" indicatif = "0.17" indoc = "2" diff --git a/src/main.rs b/src/main.rs index cdcc6376..94b24c60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,12 +89,12 @@ pub const VERSION_LONG: &str = concatdoc! {" #[tokio::main] async fn main() -> Result<()> { - human_panic::setup_panic!(Metadata { - name: env!("CARGO_PKG_NAME").into(), - version: env!("CARGO_PKG_VERSION").into(), - authors: "science-computing ag, opensoftware ".into(), - homepage: "atos.net/de/deutschland/sc".into(), - }); + human_panic::setup_panic!(human_panic::Metadata::new( + env!("CARGO_PKG_NAME"), + env!("CARGO_PKG_VERSION") + ) + .authors("science-computing ag, opensoftware ") + .homepage("atos.net/de/deutschland/sc")); let app = cli::cli(); let cli = app.get_matches(); From d5532ce94a19aa0706e05cddc59ef41ce8839065 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 17 May 2024 17:30:36 +0200 Subject: [PATCH 035/150] Improve/fix our human-panic metadata - `science-computing` was wrong - according to https://www.unternehmensregister.de/ it's `science + computing` (with spaces) and we should use "Aktiengesellschaft" or "AG" (uppercase). - The Atos homepage isn't really useful and we already linked to the GitHub repository in `Cargo.toml` (`package.{homepage,repository}`). - Alternatively https://atos.net/s+c might be a better link until we have a redirect from the Eviden website. - Utilize the new `Metadata` field `support`. Signed-off-by: Michael Weiss --- README.md | 2 +- src/main.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 66df8637..f85d7a05 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,6 @@ cd /tmp/butido-test-repo # License -butido was developed for science+computing ag (an Atos company). +butido was developed for science + computing AG (an Atos company). License: EPL-2.0 diff --git a/src/main.rs b/src/main.rs index 94b24c60..53fcbe0f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,8 +93,9 @@ async fn main() -> Result<()> { env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION") ) - .authors("science-computing ag, opensoftware ") - .homepage("atos.net/de/deutschland/sc")); + .authors("science + computing AG, openSoftware ") + .homepage("https://github.com/science-computing/butido") + .support("- Via https://github.com/science-computing/butido/issues or mail to opensoftware@science-computing.de")); let app = cli::cli(); let cli = app.get_matches(); From 57b17704ae0c747597512f5ab61560ea2336ac37 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 24 May 2024 20:20:03 +0200 Subject: [PATCH 036/150] Improve the documentation (comments) of butido's configuration I noticed some typos and a misplaced comments so I fixed that and also added missing comments while I'm at it. Signed-off-by: Michael Weiss --- src/config/container_config.rs | 3 ++- src/config/docker_config.rs | 3 +++ src/config/endpoint_config.rs | 8 ++++++-- src/config/not_validated.rs | 11 ++++++----- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/config/container_config.rs b/src/config/container_config.rs index 094ce541..3e282cc2 100644 --- a/src/config/container_config.rs +++ b/src/config/container_config.rs @@ -17,7 +17,8 @@ use crate::util::EnvironmentVariableName; /// The configuration for the containers #[derive(Debug, CopyGetters, Getters, Deserialize)] pub struct ContainerConfig { - /// check environment names whether they're allowed + /// Whether to check if environment variables are allowed (i.e., if their + /// names are listed in `allowed_env`). #[getset(get_copy = "pub")] check_env_names: bool, diff --git a/src/config/docker_config.rs b/src/config/docker_config.rs index 026dc6c4..54419b73 100644 --- a/src/config/docker_config.rs +++ b/src/config/docker_config.rs @@ -42,9 +42,12 @@ pub struct DockerConfig { #[getset(get = "pub")] docker_api_versions: Option>, + /// List of container images that are allowed for builds. + /// An example: `{ name = "local:debian12-default", short_name ="deb12" }` #[getset(get = "pub")] images: Vec, + /// A map of endpoints (name -> settings) that are used as container hosts to run builds on #[getset(get = "pub")] endpoints: HashMap, } diff --git a/src/config/endpoint_config.rs b/src/config/endpoint_config.rs index 86c9f198..a0896bd1 100644 --- a/src/config/endpoint_config.rs +++ b/src/config/endpoint_config.rs @@ -40,7 +40,7 @@ pub struct Endpoint { #[getset(get = "pub")] uri: String, - /// The type of the endpoint + /// The type of the endpoint (either "socket" or "http") #[getset(get = "pub")] endpoint_type: EndpointType, @@ -48,10 +48,14 @@ pub struct Endpoint { #[getset(get_copy = "pub")] maxjobs: usize, + /// Sets the networking mode for the containers. + /// Supported standard values are: "bridge", "host", "none", and "container:". Any + /// other value is taken as a custom network's name to which this container should connect to. + /// (See https://docs.docker.com/engine/api/v1.45/#tag/Image/operation/ImageBuild) #[getset(get = "pub")] network_mode: Option, - /// Duration length of timeout for connecting endpoint + /// Timeout in seconds for connecting to this endpoint #[getset(get = "pub")] timeout: Option, } diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index e6b5ed61..c2a44a58 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -41,13 +41,13 @@ pub struct NotValidatedConfiguration { #[getset(get = "pub")] log_dir: PathBuf, - /// Whether the script interpolation feature should be struct, i.e. missing variables result in + /// Whether the script interpolation feature should be strict, i.e. missing variables result in /// a failing interpolation. This should be `true` for most users. #[serde(default = "default_strict_script_interpolation")] #[getset(get = "pub")] strict_script_interpolation: bool, - /// The format of the progress bars + /// The format of the progress status output for various operations #[serde(default = "default_progress_format")] #[getset(get = "pub")] progress_format: String, @@ -105,12 +105,12 @@ pub struct NotValidatedConfiguration { #[getset(get = "pub")] source_cache_root: PathBuf, - /// The hostname used to connect to the database + /// The hostname/FQDN/IP used to connect to the database #[getset(get = "pub")] #[serde(rename = "database_host")] database_host: String, - /// The post used to connect to the database + /// The port used to connect to the database #[getset(get = "pub")] #[serde(rename = "database_port")] database_port: u16, @@ -130,11 +130,12 @@ pub struct NotValidatedConfiguration { #[serde(rename = "database_name")] database_name: String, - /// The configuration for the Docker endpoints + /// The database connection timeout in seconds #[getset(get = "pub")] #[serde(rename = "database_connection_timeout")] database_connection_timeout: Option, + /// The configuration for the Docker endpoints and images #[getset(get = "pub")] docker: DockerConfig, From 1f95ba0ef670af0936a76cff24b7a535eb7bb38b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 24 May 2024 20:28:21 +0200 Subject: [PATCH 037/150] Remove an unused configuration setting It's unlikely that we'll need it anytime soon and we can always re-add it if so - there shouldn't be any unused settings around. Theoretically this is a breaking change that warrants incrementing `CONFIGURATION_VERSION` but it's unlikely that anyone uses this setting given that it wasn't even in the example configuration files and the generic error message for unknown settings should be fine anyway. Signed-off-by: Michael Weiss --- src/config/not_validated.rs | 6 ------ src/config/util.rs | 5 ----- 2 files changed, 11 deletions(-) diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index c2a44a58..5808bb02 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -52,12 +52,6 @@ pub struct NotValidatedConfiguration { #[getset(get = "pub")] progress_format: String, - /// The format of the spinners in the CLI - #[serde(default = "default_spinner_format")] - #[getset(get = "pub")] - #[allow(unused)] - spinner_format: String, - /// The format used to print a package /// /// This is handlebars syntax diff --git a/src/config/util.rs b/src/config/util.rs index 5c76fd30..7c203a3b 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -16,11 +16,6 @@ pub fn default_progress_format() -> String { String::from("[{elapsed_precise}] ({percent:>3}%): {bar:40.cyan/blue} | {msg}") } -/// The default spinner format -pub fn default_spinner_format() -> String { - String::from("[{elapsed_precise}] {spinner} | {msg}") -} - /// The default format that is used to print one package pub fn default_package_print_format() -> String { String::from(indoc::indoc!( From 0ea86b25977e7ad711fec1f81e7c22d0d1dbd190 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 24 May 2024 20:35:56 +0200 Subject: [PATCH 038/150] Remove unnecessary Serde rename field attribute macros No need to use them if the Rust fields have the same names. This is probably just the result of copy and paste. Signed-off-by: Michael Weiss --- src/config/not_validated.rs | 7 ------- src/package/dependency/condition.rs | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index 5808bb02..9539929d 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -83,7 +83,6 @@ pub struct NotValidatedConfiguration { releases_directory: PathBuf, /// The names of the directories inside the `releases_directory` to store different releases in - #[serde(rename = "release_stores")] #[getset(get = "pub")] release_stores: Vec, @@ -101,32 +100,26 @@ pub struct NotValidatedConfiguration { /// The hostname/FQDN/IP used to connect to the database #[getset(get = "pub")] - #[serde(rename = "database_host")] database_host: String, /// The port used to connect to the database #[getset(get = "pub")] - #[serde(rename = "database_port")] database_port: u16, /// The user used to connect to the database #[getset(get = "pub")] - #[serde(rename = "database_user")] database_user: String, /// The password used to connect to the database #[getset(get = "pub")] - #[serde(rename = "database_password")] database_password: String, /// The name of the database #[getset(get = "pub")] - #[serde(rename = "database_name")] database_name: String, /// The database connection timeout in seconds #[getset(get = "pub")] - #[serde(rename = "database_connection_timeout")] database_connection_timeout: Option, /// The configuration for the Docker endpoints and images diff --git a/src/package/dependency/condition.rs b/src/package/dependency/condition.rs index 5bc046f4..66e5cc78 100644 --- a/src/package/dependency/condition.rs +++ b/src/package/dependency/condition.rs @@ -29,15 +29,15 @@ use crate::util::EnvironmentVariableName; /// #[derive(Serialize, Deserialize, Getters, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct Condition { - #[serde(rename = "has_env", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] #[getset(get = "pub")] pub(super) has_env: Option>, - #[serde(rename = "env_eq", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] #[getset(get = "pub")] pub(super) env_eq: Option>, - #[serde(rename = "in_image", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] #[getset(get = "pub")] pub(super) in_image: Option>, } From 5c2a50cfafb9205eff3bb2a4d8e45eb4beb9e18e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 27 May 2024 20:06:17 +0200 Subject: [PATCH 039/150] Deny unknown fields in butido's configuration I already implemented this in 00636cf but forgot to also deny unknown fields in all sub-structures (recursively). This fixes that so now it shouldn't be possible to have any unknown fields in butido's configuration without getting an error message (I already had to remove `speed` in an example configuration to fix the tests). Signed-off-by: Michael Weiss --- examples/packages/repo/config.toml | 3 +-- src/config/container_config.rs | 1 + src/config/docker_config.rs | 1 + src/config/endpoint_config.rs | 1 + src/util/docker.rs | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/packages/repo/config.toml b/examples/packages/repo/config.toml index 61883fc9..5a73546c 100644 --- a/examples/packages/repo/config.toml +++ b/examples/packages/repo/config.toml @@ -47,8 +47,7 @@ images = [ [docker.endpoints.testhostname] uri = "http://0.0.0.0:8095" # the URI of the endpoint. Either http or socket path endpoint_type = "http" # either "http" or "socket" -speed = 1 # currently ignored, but required to be present -maxjobs = 1 # currently ignored, but required to be present +maxjobs = 1 # Maximum number of jobs which are allowed on this endpoint [containers] diff --git a/src/config/container_config.rs b/src/config/container_config.rs index 3e282cc2..3649012a 100644 --- a/src/config/container_config.rs +++ b/src/config/container_config.rs @@ -16,6 +16,7 @@ use crate::util::EnvironmentVariableName; /// The configuration for the containers #[derive(Debug, CopyGetters, Getters, Deserialize)] +#[serde(deny_unknown_fields)] pub struct ContainerConfig { /// Whether to check if environment variables are allowed (i.e., if their /// names are listed in `allowed_env`). diff --git a/src/config/docker_config.rs b/src/config/docker_config.rs index 54419b73..ead19bf6 100644 --- a/src/config/docker_config.rs +++ b/src/config/docker_config.rs @@ -19,6 +19,7 @@ use crate::util::docker::ContainerImage; /// Configuration of the Docker daemon interfacing functionality #[derive(Debug, Getters, CopyGetters, Deserialize)] +#[serde(deny_unknown_fields)] pub struct DockerConfig { /// The required Docker version /// diff --git a/src/config/endpoint_config.rs b/src/config/endpoint_config.rs index a0896bd1..06afb0f2 100644 --- a/src/config/endpoint_config.rs +++ b/src/config/endpoint_config.rs @@ -35,6 +35,7 @@ impl AsRef for EndpointName { /// Configuration of a single endpoint #[derive(Clone, Debug, Getters, CopyGetters, Deserialize)] +#[serde(deny_unknown_fields)] pub struct Endpoint { /// The URI where the endpoint is reachable #[getset(get = "pub")] diff --git a/src/util/docker.rs b/src/util/docker.rs index fde682a8..900c3d6a 100644 --- a/src/util/docker.rs +++ b/src/util/docker.rs @@ -51,6 +51,7 @@ impl AsRef for ImageName { } #[derive(Debug, Deserialize)] +#[serde(deny_unknown_fields)] pub struct ContainerImage { pub name: ImageName, pub short_name: ImageName, From cb0c6535fb5c5a6e69c4e22d6d9169d375ef96c4 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 28 May 2024 15:42:19 +0200 Subject: [PATCH 040/150] Implement a LIMIT argument for the CLI command to list releases The number of releases can/will grow continually so there should be an option to limit the results like with the other DB subcommands (except for `envvars` and `images` as those should grow much slower and sorting by ID/date makes less sense). I've changed the sorting order from package name (+ version + release date) to the ID (most recent releases first) as this is basically the only option that really makes sense with the query limit (plus it's probably nicer anyway if there are lots of releases as old ones aren't that relevant anymore - however, if necessary/useful, we could theoretically output the newest LIMIT releases using the old sorting order). Signed-off-by: Michael Weiss --- src/cli.rs | 8 ++++++++ src/commands/db.rs | 11 +++++++---- src/commands/release.rs | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 387fbdc5..87f47047 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -49,6 +49,14 @@ pub fn cli() -> Command { .short('p') .value_name("PKG") .help("Only list releases for package PKG"), + ) + .arg( + Arg::new("limit") + .required(false) + .long("limit") + .short('L') + .value_name("LIMIT") + .help("List newest LIMIT releases (0=unlimited)"), ); Command::new("butido") diff --git a/src/commands/db.rs b/src/commands/db.rs index 6ce7f761..115f5ad7 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -64,7 +64,9 @@ pub fn db( Some(("jobs", matches)) => jobs(db_connection_config, config, matches, default_limit), Some(("job", matches)) => job(db_connection_config, config, matches), Some(("log-of", matches)) => log_of(db_connection_config, matches), - Some(("releases", matches)) => releases(db_connection_config, config, matches), + Some(("releases", matches)) => { + releases(db_connection_config, config, matches, default_limit) + } Some((other, _)) => Err(anyhow!("Unknown subcommand: {}", other)), None => Err(anyhow!("No subcommand")), } @@ -826,9 +828,11 @@ pub fn releases( conn_cfg: DbConnectionConfig<'_>, config: &Configuration, matches: &ArgMatches, + default_limit: &usize, ) -> Result<()> { let csv = matches.get_flag("csv"); let mut conn = conn_cfg.establish_connection()?; + let limit = get_limit(matches, default_limit)?; let header = crate::commands::util::mk_header(["Package", "Version", "Date", "Path"].to_vec()); let mut query = schema::jobs::table .inner_join(schema::packages::table) @@ -840,9 +844,8 @@ pub fn releases( schema::release_stores::table .on(schema::release_stores::id.eq(schema::releases::release_store_id)), ) - .order_by(schema::packages::dsl::name.asc()) - .then_order_by(schema::packages::dsl::version.asc()) - .then_order_by(schema::releases::release_date.asc()) + .order_by(schema::releases::id.desc()) // required for the --limit implementation + .limit(limit) .into_boxed(); if let Some(date) = crate::commands::util::get_date_filter("older_than", matches)? { diff --git a/src/commands/release.rs b/src/commands/release.rs index a8f7b041..dafdb413 100644 --- a/src/commands/release.rs +++ b/src/commands/release.rs @@ -35,7 +35,8 @@ pub async fn release( ) -> Result<()> { match matches.subcommand() { Some(("list", matches)) => { - crate::commands::db::releases(db_connection_config, config, matches) + let default_limit = config.database_default_query_limit(); + crate::commands::db::releases(db_connection_config, config, matches, default_limit) } Some(("new", matches)) => new_release(db_connection_config, config, matches).await, Some(("rm", matches)) => rm_release(db_connection_config, config, matches).await, From bf13741bc65beb31d3aafd24383b87436f0d7727 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 24 May 2024 20:42:19 +0200 Subject: [PATCH 041/150] Add a configuration setting for limiting the DB queries (default limit) It is very useful to have a default limit for DB queries that can return lots of results/matches. Without a limit, the listing of DB tables can take a long time and even result in OOM kills (the latter should ideally be avoidable via data streaming instead of allocating memory to store all results before outputting them, which would also help with the former - at least with the initial delay before the output starts). See also [0]. This adds a configuration setting for the default limit as it makes sense to support user/project specific default limits. Signed-off-by: Michael Weiss [0]: https://github.com/science-computing/butido/pull/323#issuecomment-1836754840 --- src/cli.rs | 6 +-- src/commands/db.rs | 88 +++++++++++++++++-------------------- src/config/not_validated.rs | 6 +++ src/config/util.rs | 6 +++ 4 files changed, 56 insertions(+), 50 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 7000773d..387fbdc5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -204,7 +204,7 @@ pub fn cli() -> Command { .long("limit") .short('L') .value_name("LIMIT") - .help("Only list LIMIT artifacts") + .help("List newest LIMIT artifacts (0=unlimited)") ) ) @@ -265,7 +265,7 @@ pub fn cli() -> Command { .long("limit") .short('L') .value_name("LIMIT") - .help("Only list LIMIT submits") + .help("List newest LIMIT submits (0=unlimited)") ) .arg(Arg::new("for-commit") .required(false) @@ -319,7 +319,7 @@ pub fn cli() -> Command { .long("limit") .short('L') .value_name("LIMIT") - .help("Only list newest LIMIT jobs instead of all") + .help("List newest LIMIT jobs (0=unlimited)") ) .arg(arg_older_than_date("List only jobs older than DATE")) diff --git a/src/commands/db.rs b/src/commands/db.rs index 8056316d..6ce7f761 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -51,15 +51,17 @@ pub fn db( config: &Configuration, matches: &ArgMatches, ) -> Result<()> { + let default_limit = config.database_default_query_limit(); + match matches.subcommand() { Some(("cli", matches)) => cli(db_connection_config, matches), Some(("setup", _matches)) => setup(db_connection_config), - Some(("artifacts", matches)) => artifacts(db_connection_config, matches), + Some(("artifacts", matches)) => artifacts(db_connection_config, matches, default_limit), Some(("envvars", matches)) => envvars(db_connection_config, matches), Some(("images", matches)) => images(db_connection_config, matches), Some(("submit", matches)) => submit(db_connection_config, matches), - Some(("submits", matches)) => submits(db_connection_config, matches), - Some(("jobs", matches)) => jobs(db_connection_config, config, matches), + Some(("submits", matches)) => submits(db_connection_config, matches, default_limit), + Some(("jobs", matches)) => jobs(db_connection_config, config, matches, default_limit), Some(("job", matches)) => job(db_connection_config, config, matches), Some(("log-of", matches)) => log_of(db_connection_config, matches), Some(("releases", matches)) => releases(db_connection_config, config, matches), @@ -160,8 +162,26 @@ fn setup(conn_cfg: DbConnectionConfig<'_>) -> Result<()> { .map_err(|e| anyhow!(e)) } +/// Helper function to get the LIMIT for DB queries based on the default value and CLI parameters +fn get_limit(matches: &ArgMatches, default_limit: &usize) -> Result { + let limit = matches + .get_one::("limit") + .map(|s| s.parse::()) + .transpose()? + .unwrap_or(*default_limit); + if limit == 0 { + Ok(i64::MAX) + } else { + Ok(i64::try_from(limit)?) + } +} + /// Implementation of the "db artifacts" subcommand -fn artifacts(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> { +fn artifacts( + conn_cfg: DbConnectionConfig<'_>, + matches: &ArgMatches, + default_limit: &usize, +) -> Result<()> { use crate::schema::artifacts::dsl; let csv = matches.get_flag("csv"); @@ -169,10 +189,7 @@ fn artifacts(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<( .get_one::("job_uuid") .map(|s| uuid::Uuid::parse_str(s.as_ref())) .transpose()?; - let limit = matches - .get_one::("limit") - .map(|s| s.parse::()) - .transpose()?; + let limit = get_limit(matches, default_limit)?; let hdrs = crate::commands::util::mk_header(vec!["Path", "Released", "Job"]); let mut conn = conn_cfg.establish_connection()?; @@ -180,13 +197,11 @@ fn artifacts(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<( .order_by(schema::artifacts::id.desc()) // required for the --limit implementation .inner_join(schema::jobs::table) .left_join(schema::releases::table) - .into_boxed(); + .into_boxed() + .limit(limit); if let Some(job_uuid) = job_uuid { query = query.filter(schema::jobs::dsl::uuid.eq(job_uuid)) }; - if let Some(limit) = limit { - query = query.limit(limit) - }; let data = query .load::<(models::Artifact, models::Job, Option)>(&mut conn)? @@ -358,12 +373,13 @@ fn submit(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> } /// Implementation of the "db submits" subcommand -fn submits(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> { +fn submits( + conn_cfg: DbConnectionConfig<'_>, + matches: &ArgMatches, + default_limit: &usize, +) -> Result<()> { let csv = matches.get_flag("csv"); - let limit = matches - .get_one::("limit") - .map(|s| s.parse::()) - .transpose()?; + let limit = get_limit(matches, default_limit)?; let hdrs = crate::commands::util::mk_header(vec![ "Time", "UUID", @@ -406,13 +422,8 @@ fn submits(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> .inner_join( schema::packages::table.on(schema::jobs::package_id.eq(schema::packages::id)), ) - .filter(schema::packages::name.eq(&pkgname)); - - let query = if let Some(limit) = limit { - query.limit(limit) - } else { - query - }; + .filter(schema::packages::name.eq(&pkgname)) + .limit(limit); // Only load the IDs of the submits, so we can later use them to filter the submits let submit_ids = query.select(schema::submits::id).load::(&mut conn)?; @@ -428,26 +439,12 @@ fn submits(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> .load::<(models::Submit, models::Package)>(&mut conn)? } else if let Some(pkgname) = matches.get_one::("for_pkg") { // Get all submits _for_ the package - let query = query - .inner_join({ - schema::packages::table - .on(schema::submits::requested_package_id.eq(schema::packages::id)) - }) - .filter(schema::packages::dsl::name.eq(&pkgname)); - - if let Some(limit) = limit { - query.limit(limit) - } else { - query - } - .select((schema::submits::all_columns, schema::packages::all_columns)) - .load::<(models::Submit, models::Package)>(&mut conn)? - } else if let Some(limit) = limit { query .inner_join({ schema::packages::table .on(schema::submits::requested_package_id.eq(schema::packages::id)) }) + .filter(schema::packages::dsl::name.eq(&pkgname)) .select((schema::submits::all_columns, schema::packages::all_columns)) .limit(limit) .load::<(models::Submit, models::Package)>(&mut conn)? @@ -458,6 +455,7 @@ fn submits(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> .on(schema::submits::requested_package_id.eq(schema::packages::id)) }) .select((schema::submits::all_columns, schema::packages::all_columns)) + .limit(limit) .load::<(models::Submit, models::Package)>(&mut conn)? }; @@ -491,6 +489,7 @@ fn jobs( conn_cfg: DbConnectionConfig<'_>, config: &Configuration, matches: &ArgMatches, + default_limit: &usize, ) -> Result<()> { let csv = matches.get_flag("csv"); let hdrs = crate::commands::util::mk_header(vec![ @@ -559,14 +558,6 @@ fn jobs( sel = sel.filter(schema::submits::dsl::submit_time.gt(datetime)) } - if let Some(limit) = matches - .get_one::("limit") - .map(|s| s.parse::()) - .transpose()? - { - sel = sel.limit(limit) - } - if let Some(ep_name) = matches.get_one::("endpoint") { sel = sel.filter(schema::endpoints::name.eq(ep_name)) } @@ -580,8 +571,11 @@ fn jobs( image_short_name_map.insert(image.name.clone(), image.short_name.clone()); } + let limit = get_limit(matches, default_limit)?; + let data = sel .order_by(schema::jobs::id.desc()) // required for the --limit implementation + .limit(limit) .load::<( models::Job, models::Submit, diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index 9539929d..5006209e 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -122,6 +122,12 @@ pub struct NotValidatedConfiguration { #[getset(get = "pub")] database_connection_timeout: Option, + /// The default limit for database queries (when listing tables with the `db` subcommand; + /// 0=unlimited (not recommended as it might result in OOM kills)) + #[serde(default = "default_database_query_limit")] + #[getset(get = "pub")] + database_default_query_limit: usize, + /// The configuration for the Docker endpoints and images #[getset(get = "pub")] docker: DockerConfig, diff --git a/src/config/util.rs b/src/config/util.rs index 7c203a3b..7dc846af 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -110,3 +110,9 @@ pub fn default_script_shebang() -> String { pub fn default_build_error_lines() -> usize { 10 } + +/// The default value for the number of results/rows that should be returned for DB queries that +/// list things (LIMIT) +pub fn default_database_query_limit() -> usize { + 10 +} From e4f05e2f0805bfc3f8c8583cfad6cbc2a80f6cdd Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 28 May 2024 16:13:24 +0200 Subject: [PATCH 042/150] Show relative paths instead of warnings for missing releases When listing releases from the DB, this will replace the warnings for paths to release files that aren't available locally with relative paths and a note that they aren't available locally. The warnings were present since the initial implementation (19cc89d) but don't make much sense nowadays as butido can be used on multiple systems (clients) so it can be expected that not all releases will be available locally (plus there could be a cleanup/GC policy in place). This change drops those warnings to improve/cleanup the output by sticking to a table, which also ensures that all relevant information is there (the warnings didn't contain the release dates). We could introduce a new column to indicate if a given release is available locally but deemed it nicer to integrate that information into the "Path" column. This has the advantage that we don't need more space and another advantage is that the paths will be less confusing as the prefix comes from the local configuration file (`releases_root` setting vs. data from the DB) so the actual path on the system where the release is present might be different. Displaying the relative paths (vs. an empty path or "-") has the advantage that the output still contains all relevant output from the DB (store and file names). Signed-off-by: Michael Weiss --- src/commands/db.rs | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/src/commands/db.rs b/src/commands/db.rs index 115f5ad7..e69d6a86 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -32,7 +32,7 @@ use diesel_migrations::EmbeddedMigrations; use diesel_migrations::HarnessWithOutput; use diesel_migrations::MigrationHarness; use itertools::Itertools; -use tracing::{debug, info, trace, warn}; +use tracing::{debug, info, trace}; use crate::commands::util::get_date_filter; use crate::config::Configuration; @@ -879,28 +879,23 @@ pub fn releases( models::ReleaseStore, )>(&mut conn)? .into_iter() - .filter_map(|(art, pack, rel, rstore)| { + .map(|(art, pack, rel, rstore)| { let p = config .releases_directory() - .join(rstore.store_name) - .join(art.path); - - if p.is_file() { - Some(vec![ - pack.name, - pack.version, - rel.release_date.to_string(), - p.display().to_string(), - ]) - } else { - warn!( - "Released file for {} {} not found: {}", - pack.name, - pack.version, - p.display() - ); - None - } + .join(&rstore.store_name) + .join(&art.path); + + vec![ + pack.name, + pack.version, + rel.release_date.to_string(), + if p.is_file() { + p.display().to_string() + } else { + let relative_path = PathBuf::from(rstore.store_name).join(art.path); + format!("{} is not available locally", relative_path.display()) + }, + ] }) .collect::>>(); From dc90029c8c63a05e0d31ee9ccd7eae052ea2f29f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 28 May 2024 18:22:48 +0200 Subject: [PATCH 043/150] Apply the usize parser to all LIMIT parameters for better error messages This ensures that the errors will be emitted at the right time/place so that it is clear which CLI parameter caused the parsing error. Old output: ``` $ butido db releases -L a Error: invalid digit found in string ``` New output: ``` $ butido db releases -L a error: invalid value 'a' for '--limit ': invalid digit found in string For more information, try '--help'. ``` Signed-off-by: Michael Weiss --- src/cli.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 87f47047..d541d94e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -56,7 +56,8 @@ pub fn cli() -> Command { .long("limit") .short('L') .value_name("LIMIT") - .help("List newest LIMIT releases (0=unlimited)"), + .help("List newest LIMIT releases (0=unlimited)") + .value_parser(parse_usize), ); Command::new("butido") @@ -213,6 +214,7 @@ pub fn cli() -> Command { .short('L') .value_name("LIMIT") .help("List newest LIMIT artifacts (0=unlimited)") + .value_parser(parse_usize) ) ) @@ -274,6 +276,7 @@ pub fn cli() -> Command { .short('L') .value_name("LIMIT") .help("List newest LIMIT submits (0=unlimited)") + .value_parser(parse_usize) ) .arg(Arg::new("for-commit") .required(false) @@ -328,6 +331,7 @@ pub fn cli() -> Command { .short('L') .value_name("LIMIT") .help("List newest LIMIT jobs (0=unlimited)") + .value_parser(parse_usize) ) .arg(arg_older_than_date("List only jobs older than DATE")) From ac43b82f49937e8fdb9587c79008cc73e301df61 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 28 May 2024 18:41:46 +0200 Subject: [PATCH 044/150] Properly parse the `--limit` CLI parameter from a string to usize We did the parsing twice as the unnecessary `parse_usize` function did convert the string to usize but then back to a string again (instead of returning the usize). This switches to Clap's generic value parser which should be equivalent with the old custom function without the `map(|_| s.to_owned())` (returning `Result`). Signed-off-by: Michael Weiss --- src/cli.rs | 16 +++++----------- src/commands/db.rs | 6 +----- src/commands/endpoint.rs | 8 ++------ 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index d541d94e..3aeec855 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -57,7 +57,7 @@ pub fn cli() -> Command { .short('L') .value_name("LIMIT") .help("List newest LIMIT releases (0=unlimited)") - .value_parser(parse_usize), + .value_parser(clap::value_parser!(usize)), ); Command::new("butido") @@ -214,7 +214,7 @@ pub fn cli() -> Command { .short('L') .value_name("LIMIT") .help("List newest LIMIT artifacts (0=unlimited)") - .value_parser(parse_usize) + .value_parser(clap::value_parser!(usize)) ) ) @@ -276,7 +276,7 @@ pub fn cli() -> Command { .short('L') .value_name("LIMIT") .help("List newest LIMIT submits (0=unlimited)") - .value_parser(parse_usize) + .value_parser(clap::value_parser!(usize)) ) .arg(Arg::new("for-commit") .required(false) @@ -331,7 +331,7 @@ pub fn cli() -> Command { .short('L') .value_name("LIMIT") .help("List newest LIMIT jobs (0=unlimited)") - .value_parser(parse_usize) + .value_parser(clap::value_parser!(usize)) ) .arg(arg_older_than_date("List only jobs older than DATE")) @@ -1111,7 +1111,7 @@ pub fn cli() -> Command { .long("limit") .value_name("LIMIT") .help("Only list LIMIT processes for each container") - .value_parser(parse_usize) + .value_parser(clap::value_parser!(usize)) ) ) ) @@ -1355,12 +1355,6 @@ fn parse_date_from_string(s: &str) -> std::result::Result { .map(|_| s.to_owned()) } -fn parse_usize(s: &str) -> std::result::Result { - usize::from_str(s) - .map_err(|e| e.to_string()) - .map(|_| s.to_owned()) -} - fn parse_u64(s: &str) -> std::result::Result { u64::from_str(s) .map_err(|e| e.to_string()) diff --git a/src/commands/db.rs b/src/commands/db.rs index e69d6a86..40914fea 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -166,11 +166,7 @@ fn setup(conn_cfg: DbConnectionConfig<'_>) -> Result<()> { /// Helper function to get the LIMIT for DB queries based on the default value and CLI parameters fn get_limit(matches: &ArgMatches, default_limit: &usize) -> Result { - let limit = matches - .get_one::("limit") - .map(|s| s.parse::()) - .transpose()? - .unwrap_or(*default_limit); + let limit = *matches.get_one::("limit").unwrap_or(default_limit); if limit == 0 { Ok(i64::MAX) } else { diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index 6d86bbe3..40792832 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -13,7 +13,6 @@ use std::collections::HashMap; use std::io::Write; use std::ops::Deref; -use std::str::FromStr; use std::sync::Arc; use anyhow::anyhow; @@ -340,10 +339,7 @@ async fn containers_top( matches: &ArgMatches, config: &Configuration, ) -> Result<()> { - let limit = matches - .get_one::("limit") - .map(|s| usize::from_str(s.as_ref())) - .transpose()?; + let limit = matches.get_one::("limit"); let older_than_filter = crate::commands::util::get_date_filter("older_than", matches)?; let newer_than_filter = crate::commands::util::get_date_filter("newer_than", matches)?; let csv = matches.get_flag("csv"); @@ -398,7 +394,7 @@ async fn containers_top( .inspect(|(cid, _top)| trace!("Processing top of container: {}", cid)) .map(|(container_id, top)| { let processes = if let Some(limit) = limit { - top.processes.into_iter().take(limit).collect() + top.processes.into_iter().take(*limit).collect() } else { top.processes }; From 0b227219f6354d23d11ecebc2d57af03e4e02435 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 13:02:24 +0000 Subject: [PATCH 045/150] build(deps): bump itertools from 0.12.1 to 0.13.0 Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.12.1 to 0.13.0. - [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0) --- updated-dependencies: - dependency-name: itertools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d0a3c1b..5b782745 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -240,7 +240,7 @@ dependencies = [ "humantime", "indicatif", "indoc", - "itertools 0.12.1", + "itertools 0.13.0", "lazy_static", "parse-display", "pom", @@ -1259,9 +1259,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] diff --git a/Cargo.toml b/Cargo.toml index c3138736..aa8864bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ human-panic = "2" humantime = "2" indicatif = "0.17" indoc = "2" -itertools = "0.12" +itertools = "0.13" lazy_static = "1" parse-display = "0.9" pom = "3" From 71b19216a89306f9b2ce9616d9e942eaf7e40ddf Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Tue, 30 Apr 2024 15:20:07 +0200 Subject: [PATCH 046/150] Refactor Finish Message Formatting with Colorization This commit enhances the finish message formatting by incorporating color-coded status messages for improved readability and clarity. Changes include: - Replaced redundant format strings with simple colorized messages. - Consolidated the final message formatting to a single step with colored status indicators. Key modifications: - Used `colored::Colorize` for colorizing the success and error messages. - Simplified message construction by combining dynamic and static parts after determining the status. Signed-off-by: Nico Steinle --- src/endpoint/scheduler.rs | 37 +++++++++++--------------------- src/orchestrator/orchestrator.rs | 5 +++-- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs index 3e8b0906..e005c6db 100644 --- a/src/endpoint/scheduler.rs +++ b/src/endpoint/scheduler.rs @@ -462,31 +462,20 @@ impl<'a> LogReceiver<'a> { trace!("Finishing bar = {:?}", success); let finish_msg = match success { - Some(true) => format!( - "[{}/{} {} {} {}]: finished successfully", - self.endpoint_name, - self.container_id_chrs, - self.job.uuid(), - self.package_name, - self.package_version - ), - Some(false) => format!( - "[{}/{} {} {} {}]: finished with error", - self.endpoint_name, - self.container_id_chrs, - self.job.uuid(), - self.package_name, - self.package_version - ), - None => format!( - "[{}/{} {} {} {}]: finished", - self.endpoint_name, - self.container_id_chrs, - self.job.uuid(), - self.package_name, - self.package_version - ), + Some(true) => "finished successfully".green().to_string(), + Some(false) => "finished with error".red().to_string(), + None => "finished".to_string(), }; + + let finish_msg = format!( + "[{}/{} {} {} {}]: {}", + self.endpoint_name, + self.container_id_chrs, + self.job.uuid(), + self.package_name, + self.package_version, + finish_msg + ); self.bar.finish_with_message(finish_msg); if let Some(mut lf) = logfile { diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 8dd218f9..3d2de934 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -20,6 +20,7 @@ use anyhow::anyhow; use anyhow::Context; use anyhow::Error; use anyhow::Result; +use colored::Colorize; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; use diesel::PgConnection; @@ -562,7 +563,7 @@ impl<'a> Drop for JobTask<'a> { let errmsg = if self.jobdef.dependencies.is_empty() { "error occurred" } else { - "error on other task" + "inherited" }; self.bar.finish_with_message(format!( @@ -570,7 +571,7 @@ impl<'a> Drop for JobTask<'a> { self.jobdef.job.uuid(), self.jobdef.job.package().name(), self.jobdef.job.package().version(), - msg = errmsg + msg = errmsg.yellow() )); } } From 9a5cffc49e1abdef77d97ebd1d37aeb6e8793feb Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Tue, 14 May 2024 20:16:11 +0200 Subject: [PATCH 047/150] Reformat Build Output to Minimize Text Flutter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update enhances the readability of the build output by standardizing the format and reducing text flutter when building multiple packages. Key changes include: - Implemented dynamic length calculation for endpoint names to ensure proper alignment and prevent text cutoff. - Introduced color-coded build status blocks for better visual distinction. - Updated progress bar messages to use a consistent format, accommodating longer endpoint names and maintaining a clean display. Example output before and after the changes: ``` - before: [00:00:06] (100%): █████ | [endpoint-name/XXXXXXX XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX package-name package_version]: msg - after: [00:00:06] (100%): █████ | endpoint-name XXXXXXX XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX ██ package_name package_version msg ^^--- colored build status block ``` Signed-off-by: Nico Steinle --- src/config/endpoint_config.rs | 6 +++ src/endpoint/scheduler.rs | 35 +++++++++++----- src/orchestrator/orchestrator.rs | 68 +++++++++++++++++++++----------- 3 files changed, 78 insertions(+), 31 deletions(-) diff --git a/src/config/endpoint_config.rs b/src/config/endpoint_config.rs index 86c9f198..ca4365b9 100644 --- a/src/config/endpoint_config.rs +++ b/src/config/endpoint_config.rs @@ -33,6 +33,12 @@ impl AsRef for EndpointName { } } +impl EndpointName { + pub fn len(&self) -> usize { + self.0.len() + } +} + /// Configuration of a single endpoint #[derive(Clone, Debug, Getters, CopyGetters, Deserialize)] pub struct Endpoint { diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs index e005c6db..570eb410 100644 --- a/src/endpoint/scheduler.rs +++ b/src/endpoint/scheduler.rs @@ -19,6 +19,7 @@ use colored::Colorize; use diesel::r2d2::ConnectionManager; use diesel::r2d2::Pool; use diesel::PgConnection; +use getset::{CopyGetters, Getters}; use indicatif::ProgressBar; use itertools::Itertools; use tokio::io::AsyncWriteExt; @@ -38,9 +39,12 @@ use crate::job::JobResource; use crate::job::RunnableJob; use crate::log::LogItem; +#[derive(Getters, CopyGetters)] pub struct EndpointScheduler { log_dir: Option, endpoints: Vec>, + #[getset(get = "pub")] + max_endpoint_name_length: usize, staging_store: Arc>, release_stores: Vec>, @@ -58,10 +62,16 @@ impl EndpointScheduler { log_dir: Option, ) -> Result { let endpoints = crate::endpoint::util::setup_endpoints(endpoints).await?; + let max_endpoint_name_length = endpoints + .iter() + .map(|ep| ep.name().len()) + .max() + .unwrap_or(0); Ok(EndpointScheduler { log_dir, endpoints, + max_endpoint_name_length, staging_store, release_stores, db, @@ -85,6 +95,7 @@ impl EndpointScheduler { log_dir: self.log_dir.clone(), bar, endpoint, + max_endpoint_name_length: self.max_endpoint_name_length, job, staging_store: self.staging_store.clone(), release_stores: self.release_stores.clone(), @@ -128,6 +139,7 @@ impl EndpointScheduler { pub struct JobHandle { log_dir: Option, endpoint: EndpointHandle, + max_endpoint_name_length: usize, job: RunnableJob, bar: ProgressBar, db: Pool>, @@ -185,6 +197,7 @@ impl JobHandle { let logres = LogReceiver { endpoint_name: endpoint_name.as_ref(), + max_endpoint_name_length: &self.max_endpoint_name_length, container_id_chrs: container_id.chars().take(7).collect(), package_name: &package.name, package_version: &package.version, @@ -359,6 +372,7 @@ impl JobHandle { struct LogReceiver<'a> { endpoint_name: &'a str, + max_endpoint_name_length: &'a usize, container_id_chrs: String, package_name: &'a str, package_version: &'a str, @@ -371,7 +385,6 @@ struct LogReceiver<'a> { impl<'a> LogReceiver<'a> { async fn join(mut self) -> Result { let mut success = None; - // Reserve a reasonable amount of elements. let mut accu = Vec::with_capacity(4096); @@ -389,6 +402,7 @@ impl<'a> LogReceiver<'a> { // Having a timeout of 1 sec proofed to be too long to update the time field in the // progress bar secondly. let timeout_duration = std::time::Duration::from_millis(250); + let max_endpoint_name_length = self.max_endpoint_name_length; loop { // Timeout for receiving from the log receiver channel @@ -422,10 +436,11 @@ impl<'a> LogReceiver<'a> { LogItem::CurrentPhase(ref phasename) => { trace!("Setting bar phase to {}", phasename); self.bar.set_message(format!( - "[{}/{} {} {} {}]: Phase: {}", + "{: LogReceiver<'a> { LogItem::State(Ok(())) => { trace!("Setting bar state to Ok"); self.bar.set_message(format!( - "[{}/{} {} {} {}]: State Ok", + "{: LogReceiver<'a> { LogItem::State(Err(ref e)) => { trace!("Setting bar state to Err: {}", e); self.bar.set_message(format!( - "[{}/{} {} {} {}]: State Err: {}", + "{: LogReceiver<'a> { trace!("Finishing bar = {:?}", success); let finish_msg = match success { - Some(true) => "finished successfully".green().to_string(), - Some(false) => "finished with error".red().to_string(), - None => "finished".to_string(), + Some(true) => "\u{2588}\u{2588}".green(), + Some(false) => "\u{2588}\u{2588}".red(), + None => "\u{2588}\u{2588}".blue(), }; let finish_msg = format!( - "[{}/{} {} {} {}]: {}", + "{: Drop for JobTask<'a> { "inherited" }; - self.bar.finish_with_message(format!( - "[{} {} {}] Stopped, {msg}", + let max_endpoint_name_length = self.scheduler.max_endpoint_name_length(); + self.bar.set_message(format!( + "{:- JobTask<'a> { sender: Vec>, ) -> Self { let bar = prep.bar.clone(); + let max_endpoint_name_length = prep.scheduler.max_endpoint_name_length(); bar.set_message(format!( - "[{} {} {}]: Booting", + "{:- JobTask<'a> { // as long as the job definition lists dependencies that are not in the received_dependencies list... let dependency_receiving_span = tracing::debug_span!("receiving dependencies"); + let max_endpoint_name_length = self.scheduler.max_endpoint_name_length(); while !all_dependencies_are_in(&self.jobdef.dependencies, &received_dependencies) { // Update the status bar message - self.bar.set_message({ - format!( - "[{} {} {}]: Waiting ({}/{})...", - self.jobdef.job.uuid(), - self.jobdef.job.package().name(), - self.jobdef.job.package().version(), - received_dependencies - .iter() - .filter(|(rd_uuid, _)| self.jobdef.dependencies.contains(rd_uuid)) - .count(), - dep_len - ) - }); + self.bar.set_message(format!( + "{:- JobTask<'a> { self.sender[0].send(Err(received_errors)).await; // ... and stop operation, because the whole tree will fail anyways. - self.bar.finish_with_message(format!( - "[{} {} {}] Stopping, errors from child received", + self.bar.set_message(format!( + "{:- JobTask<'a> { ) })?; } - self.bar.finish_with_message(format!( - "[{} {} {}] Reusing artifact", + self.bar.set_message(format!( + "{:- JobTask<'a> { dependency_artifacts ); self.bar.set_message(format!( - "[{} {} {}]: Preparing...", + "{:- JobTask<'a> { )?; self.bar.set_message(format!( - "[{} {} {}]: Scheduling...", + "{:- Date: Thu, 16 May 2024 11:52:44 +0200 Subject: [PATCH 048/150] Update Progress Bar Format in Configuration This commit refines the progress bar format in both the `config.toml` file and the `default_progress_format` function to improve readability and adapt to narrower terminal widths. The changes include: - Simplified the progress format by removing unnecessary brackets and adjusting the bar length. - Reduced the progress bar length from 40 characters to 5 characters to fit within more compact terminal displays. Signed-off-by: Nico Steinle --- config.toml | 2 +- src/config/util.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index a4090ba6..a619a636 100644 --- a/config.toml +++ b/config.toml @@ -12,7 +12,7 @@ compatibility = 1 # fit a 80 or 100 character wide terminal! # # This is also the default if the setting is not present. -progress_format = "[{elapsed_precise}] ({percent:>3}%): {bar:40.cyan/blue} | {msg}" +progress_format = "{elapsed_precise} {percent:>3}% {bar:5.cyan/blue} | {msg}" # The shebang line used when compiling the packaging scripts diff --git a/src/config/util.rs b/src/config/util.rs index 5c76fd30..3277dff2 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -13,7 +13,7 @@ /// The default progress bar format pub fn default_progress_format() -> String { - String::from("[{elapsed_precise}] ({percent:>3}%): {bar:40.cyan/blue} | {msg}") + String::from("{elapsed_precise} {percent:>3}% {bar:5.cyan/blue} | {msg}") } /// The default spinner format From 2f8034b54a54b38f933d4e0901376f7d24bddb0e Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Tue, 30 Apr 2024 14:04:50 +0200 Subject: [PATCH 049/150] Trigger Source Verification After Source Download This ensures that the 'source verify' process is triggered immediately after the 'source download' is completed, enhancing the workflow's integrity by verifying the source as soon as it is downloaded. Fixes #371 Signed-off-by: Nico Steinle --- src/commands/source/download.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index 484a4fd0..c622e61d 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -314,5 +314,8 @@ pub async fn download( } debug!("r = {:?}", r); + + super::verify(matches, config, repo, progressbars).await?; + r } From f6ec0048e5fce71b057582f081e00257cb321b9b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 5 Jun 2024 18:01:32 +0200 Subject: [PATCH 050/150] Properly parse CLI parameters for timeouts into unsigned integers We can avoid the `parse_u64` function thanks to Clap's generic value parser and this moves the parsing errors to the correct place (when parsing the CLI parameters so that Clap can emit an appropriate error message). Signed-off-by: Michael Weiss --- src/cli.rs | 16 ++++++---------- src/commands/endpoint.rs | 6 ++---- src/commands/endpoint_container.rs | 6 ++---- src/commands/source/download.rs | 6 +----- src/db/connection.rs | 5 ++--- 5 files changed, 13 insertions(+), 26 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 3aeec855..a06fad7d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -9,7 +9,6 @@ // use std::path::PathBuf; -use std::str::FromStr; use clap::crate_authors; use clap::Arg; @@ -147,11 +146,12 @@ pub fn cli() -> Command { .required(false) .long("db-timeout") .value_name("TIMEOUT") - .help("Override the database connection timeout") + .help("Override the database connection timeout (in seconds)") .long_help(indoc::indoc!(r#" Override the database connection timeout set via configuration. Can also be overridden via environment 'BUTIDO_DATABASE_CONNECTION_TIMEOUT', but this setting has precedence. "#)) + .value_parser(clap::value_parser!(u16)) ) .subcommand(Command::new("generate-completions") @@ -834,6 +834,7 @@ pub fn cli() -> Command { .long("timeout") .value_name("TIMEOUT") .help("Set timeout for download in seconds") + .value_parser(clap::value_parser!(u64)) ) ) .subcommand(Command::new("of") @@ -1069,7 +1070,7 @@ pub fn cli() -> Command { .short('t') .value_name("TIMEOUT") .help("Timeout in seconds") - .value_parser(parse_u64) + .value_parser(clap::value_parser!(u64)) ) ) .subcommand(Command::new("list") @@ -1153,7 +1154,8 @@ pub fn cli() -> Command { .required(false) .long("timeout") .value_name("DURATION") - .help("Timeout") + .help("Timeout in seconds") + .value_parser(clap::value_parser!(u64)) ) ) .subcommand(Command::new("exec") @@ -1355,12 +1357,6 @@ fn parse_date_from_string(s: &str) -> std::result::Result { .map(|_| s.to_owned()) } -fn parse_u64(s: &str) -> std::result::Result { - u64::from_str(s) - .map_err(|e| e.to_string()) - .map(|_| s.to_owned()) -} - #[cfg(test)] mod tests { use super::env_pass_validator; diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index 40792832..bc73f177 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -451,10 +451,8 @@ async fn containers_stop( let newer_than_filter = crate::commands::util::get_date_filter("newer_than", matches)?; let stop_timeout = matches - .get_one::("timeout") - .map(|s| s.parse::()) - .transpose()? - .map(std::time::Duration::from_secs); + .get_one::("timeout") + .map(|s| std::time::Duration::from_secs(*s)); let stats = connect_to_endpoints(config, &endpoint_names) .await? diff --git a/src/commands/endpoint_container.rs b/src/commands/endpoint_container.rs index 0e102a45..b8a0b702 100644 --- a/src/commands/endpoint_container.rs +++ b/src/commands/endpoint_container.rs @@ -150,10 +150,8 @@ async fn stop(matches: &ArgMatches, container: Container<'_>) -> Result<()> { container .stop({ matches - .get_one::("timeout") - .map(|s| s.parse::()) - .transpose()? - .map(std::time::Duration::from_secs) + .get_one::("timeout") + .map(|t| std::time::Duration::from_secs(*t)) }) .await .map_err(Error::from) diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index 484a4fd0..34b7f317 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -205,11 +205,7 @@ pub async fn download( progressbars: ProgressBars, ) -> Result<()> { let force = matches.get_flag("force"); - let timeout = matches - .get_one::("timeout") - .map(|s| s.parse::()) - .transpose() - .context("Parsing timeout argument to integer")?; + let timeout = matches.get_one::("timeout").copied(); let cache = PathBuf::from(config.source_cache_root()); let sc = SourceCache::new(cache); let pname = matches diff --git a/src/db/connection.rs b/src/db/connection.rs index 412c893f..012167a4 100644 --- a/src/db/connection.rs +++ b/src/db/connection.rs @@ -76,9 +76,8 @@ impl<'a> DbConnectionConfig<'a> { .get_one::("database_name") .unwrap_or_else(|| config.database_name()), database_connection_timeout: { - cli.get_one::("database_connection_timeout") - .map(|s| s.parse::()) - .transpose()? + cli.get_one::("database_connection_timeout") + .map(|x| *x) .unwrap_or_else(|| { // hardcoded default of 30 seconds database timeout config.database_connection_timeout().unwrap_or(30) From 09cbb234f2e537b17759c23d53c58c05b561437b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 5 Jun 2024 19:28:51 +0200 Subject: [PATCH 051/150] Update all dependencies (Cargo.lock) and bump the MSRV (1.76 -> 1.78) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). The crate `diesel_derives v2.2.0` requires `rustc 1.78.0` or newer so let's bump the MSRV accordingly. Bumping the MSRV also removes the last usage of the `rustversion` crate but I'll keep it around for now as it can become relevant again with every new Rust version (so it seems best to just keep it around instead of having to remove and re-add it "regularly"). Signed-off-by: Michael Weiss --- .github/workflows/cargo.yml | 8 +- Cargo.lock | 453 +++++++++++++++++++----------------- Cargo.toml | 2 +- README.md | 2 +- src/main.rs | 1 + src/package/package.rs | 3 - 6 files changed, 252 insertions(+), 217 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 9d9354e5..1a067d05 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -14,7 +14,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@v1 with: - toolchain: 1.76.0 # MSRV + toolchain: 1.78.0 # MSRV components: rustfmt - name: Run cargo fmt @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.76.0 # MSRV + - 1.78.0 # MSRV - stable - beta @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.76.0 # MSRV + - 1.78.0 # MSRV - stable - beta steps: @@ -99,7 +99,7 @@ jobs: fail-fast: false matrix: include: - - rust: 1.76.0 # MSRV + - rust: 1.78.0 # MSRV optional: false - rust: beta optional: true diff --git a/Cargo.lock b/Cargo.lock index 6d0a3c1b..91640064 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -43,47 +43,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -91,9 +92,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "aquamarine" @@ -106,7 +107,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -123,20 +124,26 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", @@ -161,9 +168,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bincode" @@ -262,7 +269,7 @@ dependencies = [ "terminal_size", "tokio", "tokio-stream", - "toml 0.8.12", + "toml 0.8.14", "tracing", "tracing-chrome", "tracing-subscriber", @@ -302,9 +309,9 @@ checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "camino" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ "serde", ] @@ -334,9 +341,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.96" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" dependencies = [ "jobserver", "libc", @@ -402,9 +409,9 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "colored" @@ -470,9 +477,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -498,9 +505,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -543,6 +550,41 @@ dependencies = [ "serde", ] +[[package]] +name = "darling" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.66", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.66", +] + [[package]] name = "deranged" version = "0.3.11" @@ -567,9 +609,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.1.6" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff236accb9a5069572099f0b350a92e9560e8e63a9b8d546162f4a5e03026bb2" +checksum = "35b696af9ff4c0d2a507db2c5faafa8aa0205e297e5f11e203a24226d5355e7a" dependencies = [ "bitflags 2.5.0", "byteorder", @@ -584,21 +626,22 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14701062d6bed917b5c7103bdffaee1e4609279e240488ad24e7bd979ca6866c" +checksum = "0d6fdd83d5947068817016e939596d246e5367279453f2a3433287894f2f2996" dependencies = [ "diesel_table_macro_syntax", + "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "diesel_migrations" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6036b3f0120c5961381b570ee20a02432d7e2d27ea60de9578799cf9156914ac" +checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" dependencies = [ "diesel", "migrations_internals", @@ -607,11 +650,11 @@ dependencies = [ [[package]] name = "diesel_table_macro_syntax" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" +checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -624,11 +667,25 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "dsl_auto_type" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab32c18ea6760d951659768a3e35ea72fc1ba0916d665a88dfe048b2a41e543f" +dependencies = [ + "darling", + "either", + "heck", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "either" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "encode_unicode" @@ -653,9 +710,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -787,7 +844,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -844,9 +901,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -867,9 +924,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "git2" @@ -894,15 +951,15 @@ checksum = "641b847f0375f4b2c595438eefc17a9c0fbf47b400cbdd1ad9332bf1e16b779d" [[package]] name = "h2" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" dependencies = [ + "atomic-waker", "bytes 1.6.0", "fnv", "futures-core", "futures-sink", - "futures-util", "http 1.1.0", "indexmap", "slab", @@ -931,6 +988,12 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1032,7 +1095,7 @@ dependencies = [ "os_info", "serde", "serde_derive", - "toml 0.8.12", + "toml 0.8.14", "uuid", ] @@ -1044,9 +1107,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes 1.6.0", "futures-channel", @@ -1092,7 +1155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" dependencies = [ "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.29", "linked_hash_set", "once_cell", "openssl", @@ -1121,9 +1184,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" dependencies = [ "bytes 1.6.0", "futures-channel", @@ -1147,7 +1210,7 @@ checksum = "0fafdf7b2b2de7c9784f76e02c0935e65a8117ec3b768644379983ab333ac98c" dependencies = [ "futures-util", "hex", - "hyper 0.14.28", + "hyper 0.14.29", "pin-project 1.1.5", "tokio", ] @@ -1175,6 +1238,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.5.0" @@ -1235,9 +1304,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -1248,6 +1317,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.10.5" @@ -1298,9 +1373,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" @@ -1332,9 +1407,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.16" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" dependencies = [ "cc", "libc", @@ -1365,9 +1440,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -1402,19 +1477,19 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "migrations_internals" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada" +checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", - "toml 0.7.8", + "toml 0.8.14", ] [[package]] name = "migrations_macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce3325ac70e67bbab5bd837a31cae01f1a6db64e0e744a33cb03a543469ef08" +checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" dependencies = [ "migrations_internals", "proc-macro2", @@ -1435,9 +1510,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] @@ -1455,11 +1530,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -1499,9 +1573,9 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1533,9 +1607,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -1591,7 +1665,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -1631,9 +1705,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1654,9 +1728,9 @@ dependencies = [ [[package]] name = "parse-display" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06af5f9333eb47bd9ba8462d612e37a8328a5cb80b13f0af4de4c3b89f52dee5" +checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" dependencies = [ "parse-display-derive", "regex", @@ -1665,16 +1739,16 @@ dependencies = [ [[package]] name = "parse-display-derive" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9252f259500ee570c75adcc4e317fa6f57a1e47747d622e0bf838002a7b790" +checksum = "2ae7800a4c974efd12df917266338e79a7a74415173caf7e70aa0a0707345281" dependencies = [ "proc-macro2", "quote", "regex", "regex-syntax 0.8.3", "structmeta", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -1691,9 +1765,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", "thiserror", @@ -1702,9 +1776,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" +checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" dependencies = [ "pest", "pest_generator", @@ -1712,22 +1786,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" +checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "pest_meta" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" +checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" dependencies = [ "once_cell", "pest", @@ -1736,9 +1810,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap", @@ -1781,7 +1855,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -1845,9 +1919,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pq-sys" -version = "0.4.8" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0052426df997c0cbd30789eb44ca097e3541717a7b8fa36b1c464ee7edebd" +checksum = "5576e3fa8738e1a71285f7211ff83458514aa4864aa34c2bdb422445448d4c4b" dependencies = [ "vcpkg", ] @@ -1878,9 +1952,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] @@ -2041,7 +2115,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "bytes 1.6.0", "encoding_rs", "futures-core", @@ -2096,9 +2170,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" @@ -2119,27 +2193,27 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -2176,11 +2250,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -2189,9 +2263,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -2199,38 +2273,38 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.199" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -2239,9 +2313,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -2308,7 +2382,7 @@ dependencies = [ "flate2", "futures-util", "futures_codec", - "hyper 0.14.28", + "hyper 0.14.29", "hyper-openssl", "hyperlocal", "log", @@ -2371,7 +2445,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2382,7 +2456,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2398,9 +2472,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -2458,9 +2532,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -2491,22 +2565,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2569,9 +2643,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes 1.6.0", @@ -2587,13 +2661,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2631,16 +2705,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes 1.6.0", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -2654,61 +2727,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.12", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ - "indexmap", "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.7", + "winnow", ] [[package]] @@ -2724,7 +2772,6 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -2745,7 +2792,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2759,7 +2805,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2835,7 +2881,7 @@ checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2873,9 +2919,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unindent" @@ -2989,7 +3035,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -3023,7 +3069,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3250,18 +3296,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" +checksum = "56c52728401e1dc672a56e81e593e912aa54c78f40246869f78359a2bf24d29d" dependencies = [ "memchr", ] @@ -3310,6 +3347,6 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml index c3138736..2cb73a0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ authors = [ "Michael Weiss ", # @primeos-work ] edition = "2021" -rust-version = "1.76.0" # MSRV +rust-version = "1.78.0" # MSRV license = "EPL-2.0" description = "Linux package tool utilizing Docker, PostgreSQL, and TOML" diff --git a/README.md b/README.md index f85d7a05..1f75a36d 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Building butido is easy, assuming you have a Rust installation: cargo build --release # (remove --release for a debug build) ``` -Butido is built and tested with Rust 1.76.0 as MSRV. +Butido is built and tested with Rust 1.78.0 as MSRV. ### (Development) Setup diff --git a/src/main.rs b/src/main.rs index 53fcbe0f..fee81c24 100644 --- a/src/main.rs +++ b/src/main.rs @@ -54,6 +54,7 @@ use anyhow::Error; use anyhow::Result; use aquamarine as _; use clap::ArgMatches; +use rustversion as _; // This crate is (occasionally) required (e.g., when we need version specific Clippy overrides) use tracing::{debug, error}; use tracing_subscriber::layer::SubscriberExt; diff --git a/src/package/package.rs b/src/package/package.rs index 05647cec..e24490ab 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -221,9 +221,6 @@ impl<'a> std::fmt::Debug for DebugPackage<'a> { } impl PartialEq for Package { - // Ignore the following lint as it results in a false positive with clippy 0.1.77 - // (TODO: drop this once we bump the MSRV to 1.78): - #[rustversion::attr(all(since(1.77), before(1.78)), allow(clippy::unconditional_recursion))] fn eq(&self, other: &Package) -> bool { (self.name(), self.version()).eq(&(other.name(), other.version())) } From 263a9f56c91c6cbf4001990dd89dfffba413721f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 6 Jun 2024 16:06:46 +0200 Subject: [PATCH 052/150] Use a Clap value parser for the rest of the numeric CLI arguments This ensures that butido can emit better error messages in case of parsing errors (invalid input). Signed-off-by: Michael Weiss --- src/cli.rs | 3 +++ src/commands/endpoint.rs | 12 ++---------- src/db/connection.rs | 6 ++---- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index a06fad7d..fdb4564f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -110,6 +110,7 @@ pub fn cli() -> Command { Override the database port set via configuration. Can also be overridden via environment 'BUTIDO_DATABASE_PORT', but this setting has precedence. "#)) + .value_parser(clap::value_parser!(u16)) ) .arg(Arg::new("database_user") .required(false) @@ -1035,6 +1036,7 @@ pub fn cli() -> Command { .value_name("N") .default_value("10") .help("How often to ping") + .value_parser(clap::value_parser!(u64)) ) .arg(Arg::new("ping_sleep") .required(false) @@ -1042,6 +1044,7 @@ pub fn cli() -> Command { .value_name("N") .default_value("1") .help("How long to sleep between pings") + .value_parser(clap::value_parser!(u64)) ) ) .subcommand(Command::new("stats") diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index bc73f177..81b1d365 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -70,16 +70,8 @@ async fn ping( config: &Configuration, progress_generator: ProgressBars, ) -> Result<()> { - let n_pings = matches - .get_one::("ping_n") - .map(|s| s.parse::()) - .transpose()? - .unwrap(); // safe by clap - let sleep = matches - .get_one::("ping_sleep") - .map(|s| s.parse::()) - .transpose()? - .unwrap(); // safe by clap + let n_pings = *matches.get_one::("ping_n").unwrap(); // safe by clap + let sleep = *matches.get_one::("ping_sleep").unwrap(); // safe by clap let endpoints = connect_to_endpoints(config, &endpoint_names).await?; let multibar = Arc::new({ let mp = indicatif::MultiProgress::new(); diff --git a/src/db/connection.rs b/src/db/connection.rs index 012167a4..9dac178d 100644 --- a/src/db/connection.rs +++ b/src/db/connection.rs @@ -61,10 +61,8 @@ impl<'a> DbConnectionConfig<'a> { .get_one::("database_host") .unwrap_or_else(|| config.database_host()), database_port: { - cli.get_one::("database_port") - .map(|s| s.parse::()) - .transpose()? - .unwrap_or_else(|| *config.database_port()) + *cli.get_one::("database_port") + .unwrap_or_else(|| config.database_port()) }, database_user: cli .get_one::("database_user") From f735cbe8670aa0a56c8b6675d391678fb4150d69 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 6 Jun 2024 20:37:10 +0200 Subject: [PATCH 053/150] Let Clap parse CLI arguments into UUIDs This ensures that butido can emit better error messages in case of parsing errors (invalid input). Signed-off-by: Michael Weiss --- src/cli.rs | 6 ++++++ src/commands/db.rs | 34 +++++++--------------------------- src/commands/release.rs | 6 +----- 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index fdb4564f..b0b1fa70 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -208,6 +208,7 @@ pub fn cli() -> Command { .short('J') .value_name("JOB UUID") .help("Print only artifacts for a certain job") + .value_parser(uuid::Uuid::parse_str) ) .arg(Arg::new("limit") .required(false) @@ -246,6 +247,7 @@ pub fn cli() -> Command { .index(1) .value_name("SUBMIT") .help("The Submit to show details about") + .value_parser(uuid::Uuid::parse_str) ) ) @@ -308,6 +310,7 @@ pub fn cli() -> Command { .short('S') .value_name("UUID") .help("Only list jobs of a certain submit") + .value_parser(uuid::Uuid::parse_str) ) .arg(Arg::new("image") @@ -370,6 +373,7 @@ pub fn cli() -> Command { .index(1) .value_name("UUID") .help("The job to show") + .value_parser(uuid::Uuid::parse_str) ) .arg(Arg::new("show_log") @@ -408,6 +412,7 @@ pub fn cli() -> Command { .index(1) .value_name("UUID") .help("The id of the Job") + .value_parser(uuid::Uuid::parse_str) ) ) .subcommand(releases_list_command.clone()) @@ -897,6 +902,7 @@ pub fn cli() -> Command { .index(1) .value_name("SUBMIT") .help("The submit uuid from which to release a package") + .value_parser(uuid::Uuid::parse_str) ) .arg(Arg::new("release_store_name") .required(true) diff --git a/src/commands/db.rs b/src/commands/db.rs index 40914fea..d954d0ed 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -183,10 +183,7 @@ fn artifacts( use crate::schema::artifacts::dsl; let csv = matches.get_flag("csv"); - let job_uuid = matches - .get_one::("job_uuid") - .map(|s| uuid::Uuid::parse_str(s.as_ref())) - .transpose()?; + let job_uuid = matches.get_one::("job_uuid"); let limit = get_limit(matches, default_limit)?; let hdrs = crate::commands::util::mk_header(vec!["Path", "Released", "Job"]); @@ -269,14 +266,9 @@ fn images(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> /// Implementation of the "db submit" subcommand fn submit(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> { let mut conn = conn_cfg.establish_connection()?; - let submit_id = matches - .get_one::("submit") - .map(|s| uuid::Uuid::from_str(s.as_ref())) - .transpose() - .context("Parsing submit UUID")? - .unwrap(); // safe by clap - - let submit = models::Submit::with_id(&mut conn, &submit_id) + let submit_id = matches.get_one::("submit").unwrap(); // safe by clap + + let submit = models::Submit::with_id(&mut conn, submit_id) .with_context(|| anyhow!("Loading submit '{}' from DB", submit_id))?; let githash = models::GitHash::with_id(&mut conn, submit.repo_hash_id) @@ -504,11 +496,7 @@ fn jobs( .inner_join(schema::images::table) .into_boxed(); - if let Some(submit_uuid) = matches - .get_one::("submit_uuid") - .map(|s| uuid::Uuid::parse_str(s.as_ref())) - .transpose()? - { + if let Some(submit_uuid) = matches.get_one::("submit_uuid") { sel = sel.filter(schema::submits::uuid.eq(submit_uuid)) } @@ -628,11 +616,7 @@ fn job( let show_script = matches.get_flag("show_script"); let csv = matches.get_flag("csv"); let mut conn = conn_cfg.establish_connection()?; - let job_uuid = matches - .get_one::("job_uuid") - .map(|s| uuid::Uuid::parse_str(s.as_ref())) - .transpose()? - .unwrap(); + let job_uuid = matches.get_one::("job_uuid").unwrap(); let data = schema::jobs::table .filter(schema::jobs::dsl::uuid.eq(job_uuid)) @@ -796,11 +780,7 @@ fn job( /// Implementation of the subcommand "db log-of" fn log_of(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> { let mut conn = conn_cfg.establish_connection()?; - let job_uuid = matches - .get_one::("job_uuid") - .map(|s| uuid::Uuid::parse_str(s.as_ref())) - .transpose()? - .unwrap(); + let job_uuid = matches.get_one::("job_uuid").unwrap(); let out = std::io::stdout(); let mut lock = out.lock(); diff --git a/src/commands/release.rs b/src/commands/release.rs index dafdb413..ac950efb 100644 --- a/src/commands/release.rs +++ b/src/commands/release.rs @@ -66,11 +66,7 @@ async fn new_release( debug!("Release called for: {:?} {:?}", pname, pvers); let pool = db_connection_config.establish_pool()?; - let submit_uuid = matches - .get_one::("submit_uuid") - .map(|s| uuid::Uuid::parse_str(s.as_ref())) - .transpose()? - .unwrap(); // safe by clap + let submit_uuid = matches.get_one::("submit_uuid").unwrap(); // safe by clap debug!("Release called for submit: {:?}", submit_uuid); let submit = crate::schema::submits::dsl::submits From 296eb8550fb38df29902ca5c3a7eaf511d2747e2 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 5 Jun 2024 18:13:42 +0200 Subject: [PATCH 054/150] Move the default for the database connection timeout to the source The default should be defined directly in the `config` module - that way we don't have to use an `Option` and avoid the risk of defining multiple default values. Signed-off-by: Michael Weiss --- src/config/not_validated.rs | 3 ++- src/config/util.rs | 5 +++++ src/db/connection.rs | 8 ++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index 5006209e..d7d5375b 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -120,7 +120,8 @@ pub struct NotValidatedConfiguration { /// The database connection timeout in seconds #[getset(get = "pub")] - database_connection_timeout: Option, + #[serde(default = "default_database_connection_timeout")] + database_connection_timeout: u16, /// The default limit for database queries (when listing tables with the `db` subcommand; /// 0=unlimited (not recommended as it might result in OOM kills)) diff --git a/src/config/util.rs b/src/config/util.rs index 7dc846af..e665603e 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -111,6 +111,11 @@ pub fn default_build_error_lines() -> usize { 10 } +/// The default value for the database connection timeout (in seconds) +pub fn default_database_connection_timeout() -> u16 { + 30 +} + /// The default value for the number of results/rows that should be returned for DB queries that /// list things (LIMIT) pub fn default_database_query_limit() -> usize { diff --git a/src/db/connection.rs b/src/db/connection.rs index 9dac178d..55032ce7 100644 --- a/src/db/connection.rs +++ b/src/db/connection.rs @@ -74,12 +74,8 @@ impl<'a> DbConnectionConfig<'a> { .get_one::("database_name") .unwrap_or_else(|| config.database_name()), database_connection_timeout: { - cli.get_one::("database_connection_timeout") - .map(|x| *x) - .unwrap_or_else(|| { - // hardcoded default of 30 seconds database timeout - config.database_connection_timeout().unwrap_or(30) - }) + *cli.get_one::("database_connection_timeout") + .unwrap_or_else(|| config.database_connection_timeout()) }, }) } From 128644450ba2f593e6cfcebedc2ebb74d277fe30 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 28 Jun 2024 16:00:01 +0200 Subject: [PATCH 055/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 298 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 192 insertions(+), 106 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4564ab80..6a24b723 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -107,7 +107,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -124,7 +124,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -141,9 +141,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.72" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -189,9 +189,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -209,7 +209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.7", "serde", ] @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" dependencies = [ "jobserver", "libc", @@ -373,18 +373,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -394,18 +394,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.2" +version = "4.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" +checksum = "fbca90c87c2a04da41e95d1856e8bcd22f159bdbfa147314d2ce5218057b0e58" dependencies = [ "clap", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "colorchoice" @@ -571,7 +571,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -582,7 +582,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -609,11 +609,11 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b696af9ff4c0d2a507db2c5faafa8aa0205e297e5f11e203a24226d5355e7a" +checksum = "62d6dcd069e7b5fe49a302411f759d4cf1cf2c27fe798ef46fb8baefc053dd2b" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "byteorder", "chrono", "diesel_derives", @@ -626,15 +626,15 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6fdd83d5947068817016e939596d246e5367279453f2a3433287894f2f2996" +checksum = "59de76a222c2b8059f789cbe07afbfd8deb8c31dd0bc2a21f85e256c1def8259" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -654,7 +654,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -669,23 +669,23 @@ dependencies = [ [[package]] name = "dsl_auto_type" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab32c18ea6760d951659768a3e35ea72fc1ba0916d665a88dfe048b2a41e543f" +checksum = "0892a17df262a24294c382f0d5997571006e7a4348b4327557c4ff1cd4a8bccc" dependencies = [ "darling", "either", "heck", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -844,7 +844,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -934,7 +934,7 @@ version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", "libgit2-sys", "log", @@ -1060,12 +1060,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes 1.6.0", - "futures-core", + "futures-util", "http 1.1.0", "http-body 1.0.0", "pin-project-lite", @@ -1073,9 +1073,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -1166,6 +1166,23 @@ dependencies = [ "tower-layer", ] +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-tls" version = "0.6.0" @@ -1256,18 +1273,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -1367,9 +1384,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" @@ -1456,9 +1473,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchers" @@ -1471,9 +1488,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "migrations_internals" @@ -1510,9 +1527,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -1607,9 +1624,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" dependencies = [ "memchr", ] @@ -1648,7 +1665,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -1665,7 +1682,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1721,7 +1738,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.5.2", "smallvec", "windows-targets 0.52.5", ] @@ -1734,7 +1751,7 @@ checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" dependencies = [ "parse-display-derive", "regex", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -1746,9 +1763,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "structmeta", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1794,7 +1811,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1855,7 +1872,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -1919,9 +1936,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pq-sys" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5576e3fa8738e1a71285f7211ff83458514aa4864aa34c2bdb422445448d4c4b" +checksum = "a24ff9e4cf6945c988f0db7005d87747bf72864965c3529d259ad155ac41d584" dependencies = [ "vcpkg", ] @@ -1952,9 +1969,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2058,23 +2075,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2088,13 +2105,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -2105,15 +2122,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ "base64 0.22.1", "bytes 1.6.0", @@ -2125,6 +2142,7 @@ dependencies = [ "http-body 1.0.0", "http-body-util", "hyper 1.3.1", + "hyper-rustls", "hyper-tls", "hyper-util", "ipnet", @@ -2159,6 +2177,21 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbc95d56eb1865f69288945759cc0879d60ee68168dce676730275804ad2b276" +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rlimit" version = "0.10.1" @@ -2180,13 +2213,26 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.23.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "2.1.2" @@ -2203,6 +2249,17 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +[[package]] +name = "rustls-webpki" +version = "0.102.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.17" @@ -2254,7 +2311,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2297,14 +2354,14 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" dependencies = [ "itoa", "ryu", @@ -2430,6 +2487,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "strsim" version = "0.11.1" @@ -2445,7 +2508,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2456,9 +2519,15 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" version = "1.0.109" @@ -2472,9 +2541,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -2483,9 +2552,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "syntect" @@ -2500,7 +2569,7 @@ dependencies = [ "once_cell", "onig", "plist", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "serde", "serde_derive", "serde_json", @@ -2580,7 +2649,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2628,9 +2697,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" dependencies = [ "tinyvec_macros", ] @@ -2667,7 +2736,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2692,6 +2761,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.15" @@ -2805,7 +2885,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2881,7 +2961,7 @@ checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", ] [[package]] @@ -2929,11 +3009,17 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2943,15 +3029,15 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" dependencies = [ "getrandom", "serde", @@ -3035,7 +3121,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "wasm-bindgen-shared", ] @@ -3069,7 +3155,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.68", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3296,9 +3382,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c52728401e1dc672a56e81e593e912aa54c78f40246869f78359a2bf24d29d" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] From f01656ff43fbfed7d21106fed3f0306ca38bcc90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:45:21 +0000 Subject: [PATCH 056/150] build(deps): bump git2 from 0.18.3 to 0.19.0 Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.18.3 to 0.19.0. - [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.18.3...git2-0.19.0) --- updated-dependencies: - dependency-name: git2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a24b723..74c9b602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -930,9 +930,9 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "git2" -version = "0.18.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ "bitflags 2.6.0", "libc", @@ -1396,9 +1396,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" -version = "0.16.2+1.7.2" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 97235efe..761f3e81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ diesel_migrations = "2" filters = "0.4" futures = "0.3" getset = "0.1" -git2 = "0.18" +git2 = "0.19" handlebars = { version = "5", features = ["no_logging"] } human-panic = "2" humantime = "2" From c6a58acb64c0ae629087530dfc3be9cb3532834e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 6 Jun 2024 21:45:17 +0200 Subject: [PATCH 057/150] Fix the ASCII table rendering for data with colored strings The colored output works via control characters that are part of the strings that are put in the columns of the table. This resulted in an incorrect column length computation as the `color_codes` feature is required to correctly support terminal color codes. I decided to additionally enable `wide_characters` support in case we ever start using (or are already using?) wide characters [0] in the data/output (e.g., emojis). That feature only requires an additional dependency on `unicode-width` that is already in `Cargo.lock`. Colors are, e.g., used in the output of "butido db submit $SUBMIT". [0]: https://en.wikipedia.org/wiki/Wide_character Signed-off-by: Michael Weiss --- Cargo.lock | 5 +++++ Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 74c9b602..7f772904 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,6 +115,11 @@ name = "ascii_table" version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c2bee9b9ee0e5768772e38c07ef0ba23a490d7e1336ec7207c25712a2661c55" +dependencies = [ + "lazy_static", + "regex", + "unicode-width", +] [[package]] name = "async-trait" diff --git a/Cargo.toml b/Cargo.toml index 761f3e81..04b24fd9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ maintenance = { status = "passively-maintained" } [dependencies] anyhow = "1" aquamarine = "0.5" -ascii_table = "4" +ascii_table = { version = "4", features = ["color_codes", "wide_characters"] } bytesize = "1" chrono = "0.4" clap = { version = "4", features = ["cargo"] } From 260b4d7dce100673178ca563a591f020c7ba4329 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 3 Jul 2024 21:50:11 +0200 Subject: [PATCH 058/150] Convert the image name lookup helper function into a struct+trait This is required to efficiently use the two helper functions in other places where we have to call them repeatedly (we don't want to unnecessarily repeat the work of the `create` method). Signed-off-by: Michael Weiss --- src/commands/build.rs | 5 ++- src/commands/db.rs | 19 +++------ src/commands/find_artifact.rs | 5 ++- src/commands/tree_of.rs | 5 ++- src/util/docker.rs | 79 ++++++++++++++++++++++++++++------- 5 files changed, 79 insertions(+), 34 deletions(-) diff --git a/src/commands/build.rs b/src/commands/build.rs index 171fe689..4c84f235 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -51,7 +51,7 @@ use crate::package::Shebang; use crate::repository::Repository; use crate::schema; use crate::source::SourceCache; -use crate::util::docker::resolve_image_name; +use crate::util::docker::ImageNameLookup; use crate::util::progress::ProgressBars; use crate::util::EnvironmentVariableName; @@ -84,9 +84,10 @@ pub async fn build( .unwrap_or_else(|| config.shebang().clone()) }); + let image_name_lookup = ImageNameLookup::create(config.docker().images()); let image_name = matches .get_one::("image") - .map(|s| resolve_image_name(s, config.docker().images())) + .map(|s| image_name_lookup.expand(s)) .unwrap()?; // safe by clap debug!("Getting repository HEAD"); diff --git a/src/commands/db.rs b/src/commands/db.rs index d954d0ed..4fca4634 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -10,7 +10,6 @@ //! Implementation of the 'db' subcommand -use std::collections::HashMap; use std::io::Write; use std::path::PathBuf; use std::process::Command; @@ -41,7 +40,7 @@ use crate::db::DbConnectionConfig; use crate::log::JobResult; use crate::package::Script; use crate::schema; -use crate::util::docker::resolve_image_name; +use crate::util::docker::ImageNameLookup; pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("migrations"); @@ -500,9 +499,10 @@ fn jobs( sel = sel.filter(schema::submits::uuid.eq(submit_uuid)) } + let image_name_lookup = ImageNameLookup::create(config.docker().images()); if let Some(image_name) = matches .get_one::("image") - .map(|s| resolve_image_name(s, config.docker().images())) + .map(|s| image_name_lookup.expand(s)) .transpose()? { sel = sel.filter(schema::images::name.eq(image_name.as_ref().to_string())) @@ -552,13 +552,10 @@ fn jobs( sel = sel.filter(schema::packages::name.eq(pkg_name)) } - let mut image_short_name_map = HashMap::new(); - for image in config.docker().images() { - image_short_name_map.insert(image.name.clone(), image.short_name.clone()); - } - let limit = get_limit(matches, default_limit)?; + let image_name_lookup = ImageNameLookup::create(config.docker().images()); + let data = sel .order_by(schema::jobs::id.desc()) // required for the --limit implementation .limit(limit) @@ -576,7 +573,6 @@ fn jobs( .map(|b| if b { "yes" } else { "no" }) .map(String::from) .unwrap_or_else(|| String::from("?")); - let image_name = crate::util::docker::ImageName::from(image.name); Ok(vec![ submit.uuid.to_string(), @@ -586,10 +582,7 @@ fn jobs( success, package.name, package.version, - image_short_name_map - .get(&image_name) - .unwrap_or(&image_name) - .to_string(), + image_name_lookup.shorten(&image.name), ]) }) .collect::>>()?; diff --git a/src/commands/find_artifact.rs b/src/commands/find_artifact.rs index dd6d0724..ca456da8 100644 --- a/src/commands/find_artifact.rs +++ b/src/commands/find_artifact.rs @@ -30,7 +30,7 @@ use crate::filestore::ReleaseStore; use crate::filestore::StagingStore; use crate::package::PackageVersionConstraint; use crate::repository::Repository; -use crate::util::docker::resolve_image_name; +use crate::util::docker::ImageNameLookup; use crate::util::progress::ProgressBars; /// Implementation of the "find_artifact" subcommand @@ -63,9 +63,10 @@ pub async fn find_artifact( .transpose()? .unwrap_or_default(); + let image_name_lookup = ImageNameLookup::create(config.docker().images()); let image_name = matches .get_one::("image") - .map(|s| resolve_image_name(s, config.docker().images())) + .map(|s| image_name_lookup.expand(s)) .transpose()?; debug!( diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index 67541532..d2cf6e55 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -21,7 +21,7 @@ use crate::package::Dag; use crate::package::PackageName; use crate::package::PackageVersionConstraint; use crate::repository::Repository; -use crate::util::docker::resolve_image_name; +use crate::util::docker::ImageNameLookup; use crate::util::EnvironmentVariableName; /// Implementation of the "tree_of" subcommand @@ -36,9 +36,10 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat .map(PackageVersionConstraint::try_from) .transpose()?; + let image_name_lookup = ImageNameLookup::create(config.docker().images()); let image_name = matches .get_one::("image") - .map(|s| resolve_image_name(s, config.docker().images())) + .map(|s| image_name_lookup.expand(s)) .transpose()?; let additional_env = matches diff --git a/src/util/docker.rs b/src/util/docker.rs index 900c3d6a..ebb26d55 100644 --- a/src/util/docker.rs +++ b/src/util/docker.rs @@ -57,29 +57,78 @@ pub struct ContainerImage { pub short_name: ImageName, } -// To convert a user-supplied image name into an expanded image name: -pub fn resolve_image_name(name: &str, available_images: &Vec) -> Result { - let mut images = HashMap::new(); - for image in available_images { - if images.insert(&image.name, &image.name).is_some() { - warn!( +pub struct ImageNameLookup { + long2short: HashMap, + short2long: HashMap, +} + +impl ImageNameLookup { + pub fn create(available_images: &Vec) -> Self { + let mut long2short = HashMap::new(); + let mut short2long = HashMap::new(); + for image in available_images { + if long2short + .insert(image.name.clone(), image.short_name.clone()) + .is_some() + { + warn!( "The image name \"{0}\" is specified multiple times in the configured `images` list", image.name ); - } - if images.insert(&image.short_name, &image.name).is_some() { - warn!( + } + if short2long + .insert(image.short_name.clone(), image.name.clone()) + .is_some() + { + warn!( "The image short name \"{0}\" is specified multiple times in the configured `images` list", image.short_name ); + } } + ImageNameLookup { + long2short, + short2long, + } + } + + // To convert a user-supplied image name into an expanded image name: + pub fn expand(&self, image_name: &str) -> Result { + let image_name = ImageName::from(image_name.to_string()); + if self.long2short.contains_key(&image_name) { + // It already is a valid long/expanded image name: + Ok(ImageName::from(image_name.to_string())) + } else if let Some(image_name) = self.short2long.get(&image_name) { + Ok(ImageName::from(image_name.to_string())) + } else { + // It is neither a valid short name nor a valid long name: + let available_long_names = self + .long2short + .clone() + .into_keys() + .map(|name| name.0.to_string()); + let available_short_names = self + .short2long + .clone() + .into_keys() + .map(|name| name.0.to_string()); + let mut available_images = available_long_names + .chain(available_short_names) + .collect::>(); + available_images.sort_unstable(); + let available_images = available_images.join(","); + Err(anyhow!("Failed to resolve the requested container image name \"{image_name}\". The available images are: {available_images}")) + } + } + + // To try to shorten an image name based on the currently configured short names: + pub fn shorten(&self, image_name: &str) -> String { + let image_name = ImageName::from(image_name.to_string()); + self.long2short + .get(&image_name) + .unwrap_or(&image_name) + .to_string() } - images.get(&ImageName::from(name.to_string())).cloned().ok_or_else(|| { - let mut available_images = images.into_keys().map(|name| name.0.to_string()).collect::>(); - available_images.sort_unstable(); - let available_images = available_images.join(","); - anyhow!("Failed to resolve the requested container image name \"{name}\". The available images are: {available_images}") - }).cloned() } #[derive( From 6734d3c50ab94a3beade5282cd8e3d2ff1f2eb22 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Jul 2024 19:08:28 +0200 Subject: [PATCH 059/150] Turn the warnings for duplicate container images names into errors There must not be any name collisions for the algorithms to expand and shorten image names to work correctly so we shouldn't only emit warnings given that these collisions are trivial to fix by simply removing the collisions from the provided configuration. This also improves the output and warns about collisions between a full and a short name again (I initially skipped this when switching to two separate hash maps in 260b4d7). Signed-off-by: Michael Weiss --- src/commands/build.rs | 2 +- src/commands/db.rs | 4 +-- src/commands/find_artifact.rs | 2 +- src/commands/tree_of.rs | 2 +- src/util/docker.rs | 47 +++++++++++++++++++---------------- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/commands/build.rs b/src/commands/build.rs index 4c84f235..c0958ab8 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -84,7 +84,7 @@ pub async fn build( .unwrap_or_else(|| config.shebang().clone()) }); - let image_name_lookup = ImageNameLookup::create(config.docker().images()); + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; let image_name = matches .get_one::("image") .map(|s| image_name_lookup.expand(s)) diff --git a/src/commands/db.rs b/src/commands/db.rs index 4fca4634..6f8bd26b 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -499,7 +499,7 @@ fn jobs( sel = sel.filter(schema::submits::uuid.eq(submit_uuid)) } - let image_name_lookup = ImageNameLookup::create(config.docker().images()); + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; if let Some(image_name) = matches .get_one::("image") .map(|s| image_name_lookup.expand(s)) @@ -554,7 +554,7 @@ fn jobs( let limit = get_limit(matches, default_limit)?; - let image_name_lookup = ImageNameLookup::create(config.docker().images()); + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; let data = sel .order_by(schema::jobs::id.desc()) // required for the --limit implementation diff --git a/src/commands/find_artifact.rs b/src/commands/find_artifact.rs index ca456da8..b42130c3 100644 --- a/src/commands/find_artifact.rs +++ b/src/commands/find_artifact.rs @@ -63,7 +63,7 @@ pub async fn find_artifact( .transpose()? .unwrap_or_default(); - let image_name_lookup = ImageNameLookup::create(config.docker().images()); + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; let image_name = matches .get_one::("image") .map(|s| image_name_lookup.expand(s)) diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index d2cf6e55..ea2f2df4 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -36,7 +36,7 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat .map(PackageVersionConstraint::try_from) .transpose()?; - let image_name_lookup = ImageNameLookup::create(config.docker().images()); + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; let image_name = matches .get_one::("image") .map(|s| image_name_lookup.expand(s)) diff --git a/src/util/docker.rs b/src/util/docker.rs index ebb26d55..08667787 100644 --- a/src/util/docker.rs +++ b/src/util/docker.rs @@ -11,10 +11,10 @@ use std::collections::HashMap; use anyhow::anyhow; +use anyhow::Context; use anyhow::Result; use serde::Deserialize; use serde::Serialize; -use tracing::warn; #[derive( parse_display::Display, @@ -63,33 +63,38 @@ pub struct ImageNameLookup { } impl ImageNameLookup { - pub fn create(available_images: &Vec) -> Self { + pub fn create(available_images: &[ContainerImage]) -> Result { let mut long2short = HashMap::new(); let mut short2long = HashMap::new(); - for image in available_images { - if long2short - .insert(image.name.clone(), image.short_name.clone()) - .is_some() - { - warn!( - "The image name \"{0}\" is specified multiple times in the configured `images` list", - image.name - ); + let mut all_names = HashMap::new(); // Optional (to check for name collisions) + for (idx, image) in available_images.iter().enumerate() { + if let Some(duplicate) = all_names.insert(image.name.clone(), idx) { + return Err(anyhow!( + "The image full name \"{0}\" is specified multiple times in the configured `images` list (either as short or full name)", + image.name + )).with_context(|| anyhow!( + "The configured container image with index {idx} ({:?}) collides with the previous definition at index {duplicate} ({:?})", + available_images.get(idx), + available_images.get(duplicate)) + ); } - if short2long - .insert(image.short_name.clone(), image.name.clone()) - .is_some() - { - warn!( - "The image short name \"{0}\" is specified multiple times in the configured `images` list", - image.short_name - ); + if let Some(duplicate) = all_names.insert(image.short_name.clone(), idx) { + return Err(anyhow!( + "The image short name \"{0}\" is specified multiple times in the configured `images` list (either as short or full name)", + image.short_name + )).with_context(|| anyhow!( + "The configured container image with index {idx} ({:?}) collides with the previous definition at index {duplicate} ({:?})", + available_images.get(idx), + available_images.get(duplicate)) + ); } + long2short.insert(image.name.clone(), image.short_name.clone()); + short2long.insert(image.short_name.clone(), image.name.clone()); } - ImageNameLookup { + Ok(ImageNameLookup { long2short, short2long, - } + }) } // To convert a user-supplied image name into an expanded image name: From b07c77e38333a94b1903229bbddf934905876599 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Jul 2024 19:28:14 +0200 Subject: [PATCH 060/150] Shorten the image names in the "db submit" output (table) So that we always shorten image names for all commands that output tables (for consistency). Signed-off-by: Michael Weiss --- src/commands/db.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/commands/db.rs b/src/commands/db.rs index 6f8bd26b..5149c2aa 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -58,7 +58,7 @@ pub fn db( Some(("artifacts", matches)) => artifacts(db_connection_config, matches, default_limit), Some(("envvars", matches)) => envvars(db_connection_config, matches), Some(("images", matches)) => images(db_connection_config, matches), - Some(("submit", matches)) => submit(db_connection_config, matches), + Some(("submit", matches)) => submit(db_connection_config, config, matches), Some(("submits", matches)) => submits(db_connection_config, matches, default_limit), Some(("jobs", matches)) => jobs(db_connection_config, config, matches, default_limit), Some(("job", matches)) => job(db_connection_config, config, matches), @@ -263,7 +263,11 @@ fn images(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> } /// Implementation of the "db submit" subcommand -fn submit(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> { +fn submit( + conn_cfg: DbConnectionConfig<'_>, + config: &Configuration, + matches: &ArgMatches, +) -> Result<()> { let mut conn = conn_cfg.establish_connection()?; let submit_id = matches.get_one::("submit").unwrap(); // safe by clap @@ -321,6 +325,8 @@ fn submit(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> n_jobs_err = jobs_err.to_string().red(), )?; + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; + let header = crate::commands::util::mk_header( [ "Job", @@ -354,7 +360,7 @@ fn submit(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> package.version.cyan(), job.container_hash.normal(), endpoint.name.normal(), - image.name.normal(), + image_name_lookup.shorten(&image.name).normal(), ]) }) .collect::>>>()?; From 2f81bf267fa41d1d8704045c1401796280ec4a84 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Jul 2024 19:38:42 +0200 Subject: [PATCH 061/150] Support short image names for the "db submits" command The filtering parameter `--image ` will now support expanding short names/aliases. Signed-off-by: Michael Weiss --- src/commands/db.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/db.rs b/src/commands/db.rs index 5149c2aa..108f9539 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -59,7 +59,7 @@ pub fn db( Some(("envvars", matches)) => envvars(db_connection_config, matches), Some(("images", matches)) => images(db_connection_config, matches), Some(("submit", matches)) => submit(db_connection_config, config, matches), - Some(("submits", matches)) => submits(db_connection_config, matches, default_limit), + Some(("submits", matches)) => submits(db_connection_config, config, matches, default_limit), Some(("jobs", matches)) => jobs(db_connection_config, config, matches, default_limit), Some(("job", matches)) => job(db_connection_config, config, matches), Some(("log-of", matches)) => log_of(db_connection_config, matches), @@ -370,6 +370,7 @@ fn submit( /// Implementation of the "db submits" subcommand fn submits( conn_cfg: DbConnectionConfig<'_>, + config: &Configuration, matches: &ArgMatches, default_limit: &usize, ) -> Result<()> { @@ -398,7 +399,9 @@ fn submits( }; let query = if let Some(image) = matches.get_one::("image") { - query.filter(schema::images::name.eq(image)) + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; + let image = image_name_lookup.expand(image)?; + query.filter(schema::images::name.eq(image.as_ref().to_string())) } else { query }; From de8bf88aff1ca254f5f454ab97758808e2d58d43 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Jul 2024 19:44:12 +0200 Subject: [PATCH 062/150] Support the short "-I" option for all CLI arguments that take an image Let's support this short form everywhere for consistency (plus it's handy to remember and type). All other "limit" arguments already support it. Signed-off-by: Michael Weiss --- src/cli.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index b0b1fa70..dd390cb0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -289,6 +289,7 @@ pub fn cli() -> Command { ) .arg(Arg::new("image") .required(false) + .short('I') .long("image") .value_name("IMAGE") .help("Limit listed submits to submits on IMAGE") @@ -1100,6 +1101,7 @@ pub fn cli() -> Command { .arg(Arg::new("filter_image") .required(false) + .short('I') .long("image") .value_name("IMAGE") .help("List only containers of IMAGE") From 75af1a6d13ba9f00ca1f0f86c4e784ea83d0317f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Jul 2024 19:58:59 +0200 Subject: [PATCH 063/150] Support short image names for the "endpoint containers list" command The filtering parameter `--image ` will now support expanding short names/aliases. All CLI commands that take such an image argument support the short image name expansion now. Signed-off-by: Michael Weiss --- src/commands/endpoint.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index 81b1d365..e0d39f3b 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -27,6 +27,7 @@ use tracing::{debug, info, trace}; use crate::config::Configuration; use crate::config::EndpointName; use crate::endpoint::Endpoint; +use crate::util::docker::ImageNameLookup; use crate::util::progress::ProgressBars; pub async fn endpoint( @@ -201,7 +202,12 @@ async fn containers_list( config: &Configuration, ) -> Result<()> { let list_stopped = matches.get_flag("list_stopped"); - let filter_image = matches.get_one::("filter_image"); + let filter_image = if let Some(image) = matches.get_one::("filter_image") { + let image_name_lookup = ImageNameLookup::create(config.docker().images())?; + Some(image_name_lookup.expand(image)?.as_ref().to_string()) + } else { + None + }; let older_than_filter = crate::commands::util::get_date_filter("older_than", matches)?; let newer_than_filter = crate::commands::util::get_date_filter("newer_than", matches)?; let csv = matches.get_flag("csv"); @@ -234,7 +240,12 @@ async fn containers_list( tpl.1 .into_iter() .filter(|stat| list_stopped || stat.state != "exited") - .filter(|stat| filter_image.map(|fim| *fim == stat.image).unwrap_or(true)) + .filter(|stat| { + filter_image + .as_ref() + .map(|fim| *fim == stat.image) + .unwrap_or(true) + }) .filter(|stat| { older_than_filter .as_ref() From 2c0d17e0e239de44dc0a1df22153b87343b76be9 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Jul 2024 20:15:49 +0200 Subject: [PATCH 064/150] Fix the error propagation of the "source download" command The additional source verification in 2f8034b introduced a regression by returning the source verification errors before the errors of the download operation (the download errors therefore get omitted and users get misleading errors that the sources are missing and that the verification did therefore fail). This restores the proper error messages and avoids unnecessary source verification by returning errors of the download operation before triggering the verification. We also don't need the debug output as we already return the errors and I've put `Ok(())` at the end to make it a bit more readable. Signed-off-by: Michael Weiss --- src/commands/source/download.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index 3316f28f..73244eac 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -20,7 +20,7 @@ use clap::ArgMatches; use tokio::io::AsyncWriteExt; use tokio::sync::Mutex; use tokio_stream::StreamExt; -use tracing::{debug, info, trace, warn}; +use tracing::{info, trace, warn}; use crate::config::*; use crate::package::PackageName; @@ -305,13 +305,12 @@ pub async fn download( if r.is_err() { progressbar.lock().await.error().await; + return r; } else { progressbar.lock().await.success().await; } - debug!("r = {:?}", r); - super::verify(matches, config, repo, progressbars).await?; - r + Ok(()) } From 69e2eb8224e9b627174eb49757af85ac1e635595 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Tue, 16 Jul 2024 14:14:14 +0200 Subject: [PATCH 065/150] Display artifacts that are reused again This got messed up in 9a5cffc49e1abdef77d97ebd1d37aeb6e8793feb Signed-off-by: Nico Steinle --- src/orchestrator/orchestrator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 27e016c5..46f66385 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -569,7 +569,7 @@ impl<'a> Drop for JobTask<'a> { }; let max_endpoint_name_length = self.scheduler.max_endpoint_name_length(); - self.bar.set_message(format!( + self.bar.finish_with_message(format!( "{:- JobTask<'a> { self.sender[0].send(Err(received_errors)).await; // ... and stop operation, because the whole tree will fail anyways. - self.bar.set_message(format!( + self.bar.finish_with_message(format!( "{:- JobTask<'a> { ) })?; } - self.bar.set_message(format!( + self.bar.finish_with_message(format!( "{:- Date: Mon, 22 Jul 2024 18:12:59 +0000 Subject: [PATCH 066/150] build(deps): bump openssl from 0.10.64 to 0.10.66 Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.64 to 0.10.66. - [Release notes](https://github.com/sfackler/rust-openssl/releases) - [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.66) --- updated-dependencies: - dependency-name: openssl dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7f772904..00c4b5ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1666,9 +1666,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -1698,9 +1698,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", From aef08a363c5f09670a56ba239a7c1b0fe0e208b2 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 31 Jul 2024 19:40:06 +0200 Subject: [PATCH 067/150] Fix all clippy warnings (beta toolchain version 0.1.81) The new `manual_inspect` lint [0] wants us to replace uses of `map`, which return the original item, with `inspect` as it is both clearer in intent and shorter. [0]: https://rust-lang.github.io/rust-clippy/master/index.html#/manual_inspect Signed-off-by: Michael Weiss --- src/commands/endpoint.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index e0d39f3b..aebb7ea3 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -85,11 +85,10 @@ async fn ping( endpoints .iter() .map(|endpoint| { - let bar = progress_generator.bar().map(|bar| { + let bar = progress_generator.bar().inspect(|bar| { bar.set_length(n_pings); bar.set_message(format!("Pinging {}", endpoint.name())); multibar.add(bar.clone()); - bar }); async move { @@ -156,9 +155,8 @@ async fn stats( .collect::>() .collect::>>() .await - .map_err(|e| { + .inspect_err(|_| { bar.finish_with_message("Fetching stats errored"); - e })? .into_iter() .map(|stat| { From 88f9c0f3acbd95a9e88ed8d99b5d1ae55587f63c Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 31 Jul 2024 19:32:23 +0200 Subject: [PATCH 068/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 455 +++++++++++++++++++++++++++-------------------------- 1 file changed, 228 insertions(+), 227 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 00c4b5ee..a509d5b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -58,33 +58,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -107,7 +107,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -123,13 +123,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -165,12 +165,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -209,9 +203,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "regex-automata 0.4.7", @@ -274,7 +268,7 @@ dependencies = [ "terminal_size", "tokio", "tokio-stream", - "toml 0.8.14", + "toml 0.8.18", "tracing", "tracing-chrome", "tracing-subscriber", @@ -302,9 +296,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" [[package]] name = "bytesize" @@ -346,13 +340,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.101" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -373,23 +366,23 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "clap" -version = "4.5.7" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +checksum = "c53aa12ec67affac065e7c7dd20a42fa2a4094921b655711d5d3107bb3d52bed" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.7" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +checksum = "efbdf2dd5fe10889e0c61942ff5d948aaf12fd0b4504408ab0cbb1916c2cffa9" dependencies = [ "anstream", "anstyle", @@ -399,24 +392,24 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.6" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbca90c87c2a04da41e95d1856e8bcd22f159bdbfa147314d2ce5218057b0e58" +checksum = "a8670053e87c316345e384ca1f3eba3006fc6355ed8b8a1140d104e109e3df34" dependencies = [ "clap", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -557,9 +550,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -567,27 +560,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -614,9 +607,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d6dcd069e7b5fe49a302411f759d4cf1cf2c27fe798ef46fb8baefc053dd2b" +checksum = "bf97ee7261bb708fa3402fa9c17a54b70e90e3cb98afb3dc8999d5512cb03f94" dependencies = [ "bitflags 2.6.0", "byteorder", @@ -631,15 +624,15 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59de76a222c2b8059f789cbe07afbfd8deb8c31dd0bc2a21f85e256c1def8259" +checksum = "d6ff2be1e7312c858b2ef974f5c7089833ae57b5311b334b30923af58e5718d8" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -659,7 +652,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -674,16 +667,16 @@ dependencies = [ [[package]] name = "dsl_auto_type" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0892a17df262a24294c382f0d5997571006e7a4348b4327557c4ff1cd4a8bccc" +checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" dependencies = [ "darling", "either", "heck", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -849,7 +842,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -961,7 +954,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" dependencies = [ "atomic-waker", - "bytes 1.6.0", + "bytes 1.7.0", "fnv", "futures-core", "futures-sink", @@ -1026,7 +1019,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "fnv", "itoa", ] @@ -1037,7 +1030,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "fnv", "itoa", ] @@ -1048,18 +1041,18 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "http 0.2.12", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "http 1.1.0", ] @@ -1069,10 +1062,10 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -1090,9 +1083,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "human-panic" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c5d0e9120f6bca6120d142c7ede1ba376dd6bf276d69dd3dbe6cbeb7824179" +checksum = "1c5a08ed290eac04006e21e63d32e90086b6182c7cd0452d10f4264def1fec9a" dependencies = [ "anstream", "anstyle", @@ -1100,7 +1093,7 @@ dependencies = [ "os_info", "serde", "serde_derive", - "toml 0.8.14", + "toml 0.8.18", "uuid", ] @@ -1112,11 +1105,11 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "futures-channel", "futures-core", "futures-util", @@ -1135,16 +1128,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "futures-channel", "futures-util", "h2", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", "itoa", "pin-project-lite", @@ -1160,7 +1153,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" dependencies = [ "http 0.2.12", - "hyper 0.14.29", + "hyper 0.14.30", "linked_hash_set", "once_cell", "openssl", @@ -1179,7 +1172,7 @@ checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "rustls", "rustls-pki-types", @@ -1194,9 +1187,9 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "native-tls", "tokio", @@ -1206,16 +1199,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", "socket2", "tokio", @@ -1232,7 +1225,7 @@ checksum = "0fafdf7b2b2de7c9784f76e02c0935e65a8117ec3b768644379983ab333ac98c" dependencies = [ "futures-util", "hex", - "hyper 0.14.29", + "hyper 0.14.30", "pin-project 1.1.5", "tokio", ] @@ -1341,9 +1334,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -1371,9 +1364,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1439,12 +1432,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "line-wrap" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -1504,7 +1491,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", - "toml 0.8.14", + "toml 0.8.18", ] [[package]] @@ -1541,13 +1528,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1602,16 +1590,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "num_threads" version = "0.1.7" @@ -1629,9 +1607,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" dependencies = [ "memchr", ] @@ -1687,7 +1665,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -1743,9 +1721,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1770,7 +1748,7 @@ dependencies = [ "regex", "regex-syntax 0.8.4", "structmeta", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -1787,9 +1765,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -1798,9 +1776,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -1808,22 +1786,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -1877,7 +1855,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -1900,13 +1878,12 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plist" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "indexmap", - "line-wrap", "quick-xml", "serde", "time", @@ -1923,9 +1900,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -1935,9 +1912,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +dependencies = [ + "zerocopy", +] [[package]] name = "pq-sys" @@ -1992,9 +1972,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" dependencies = [ "memchr", ] @@ -2080,9 +2060,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] @@ -2138,15 +2118,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ "base64 0.22.1", - "bytes 1.6.0", + "bytes 1.7.0", "encoding_rs", "futures-core", "futures-util", "h2", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-rustls", "hyper-tls", "hyper-util", @@ -2227,9 +2207,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "once_cell", "rustls-pki-types", @@ -2256,9 +2236,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "ring", "rustls-pki-types", @@ -2312,9 +2292,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -2325,9 +2305,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2344,40 +2324,41 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.118" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -2439,12 +2420,12 @@ checksum = "1e468265908f45299c26571dad9a2e5cb3656eceb51cd58f1441cf61aa71aad6" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.6.0", + "bytes 1.7.0", "chrono", "flate2", "futures-util", "futures_codec", - "hyper 0.14.29", + "hyper 0.14.30", "hyper-openssl", "hyperlocal", "log", @@ -2513,7 +2494,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -2524,7 +2505,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -2546,9 +2527,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -2639,22 +2620,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -2702,9 +2683,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2717,31 +2698,30 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", - "bytes 1.6.0", + "bytes 1.7.0", "libc", "mio", - "num_cpus", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -2794,7 +2774,7 @@ version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.0", "futures-core", "futures-sink", "pin-project-lite", @@ -2812,9 +2792,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "73b98404c41291d0a0fba7148837d26858b42e57f7abe5a4865ff39dc35d1d8c" dependencies = [ "serde", "serde_spanned", @@ -2824,18 +2804,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "4866f4796a39e03923b14f9a42e88f223e2e685ee1851041e510c0134850c27f" dependencies = [ "indexmap", "serde", @@ -2890,7 +2870,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -2966,7 +2946,7 @@ checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -3040,9 +3020,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", "serde", @@ -3062,9 +3042,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.3.1" +version = "8.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" dependencies = [ "anyhow", "cargo_metadata", @@ -3076,9 +3056,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -3126,7 +3106,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", "wasm-bindgen-shared", ] @@ -3160,7 +3140,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3196,9 +3176,9 @@ dependencies = [ [[package]] name = "which" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8211e4f58a2b2805adfbefbc07bab82958fc91e3836339b1ab7ae32465dce0d7" +checksum = "3d9c5ed668ee1f17edb3b627225343d210006a90bb1e3745ce1f30b1fb115075" dependencies = [ "either", "home", @@ -3243,7 +3223,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3261,7 +3241,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3281,18 +3261,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3303,9 +3283,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3315,9 +3295,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3327,15 +3307,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3345,9 +3325,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3357,9 +3337,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3369,9 +3349,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3381,15 +3361,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "93b68c91a1b24c7456960ac3290e86a316f3aefcda89c4cad24ae3eda34f4411" dependencies = [ "memchr", ] @@ -3436,6 +3416,27 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "zerocopy" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "zeroize" version = "1.8.1" From 782ac19a8d27c083d89c002eab6bfcf03a56ae24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:14:07 +0000 Subject: [PATCH 069/150] build(deps): bump ptree from 0.4.0 to 0.5.0 Bumps [ptree](https://gitlab.com/Noughmad/ptree) from 0.4.0 to 0.5.0. - [Commits](https://gitlab.com/Noughmad/ptree/commits/master) --- updated-dependencies: - dependency-name: ptree dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a509d5b1..9b76ab3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1963,9 +1963,9 @@ dependencies = [ [[package]] name = "ptree" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0de80796b316aec75344095a6d2ef68ec9b8f573b9e7adc821149ba3598e270" +checksum = "709c3b241d6a6ccc1933b1c6d7d997fae2b3dff8981f6780eac67df03c32f3ef" dependencies = [ "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 04b24fd9..c89b134f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ itertools = "0.13" lazy_static = "1" parse-display = "0.9" pom = "3" -ptree = { version = "0.4", default-features = false } +ptree = { version = "0.5", default-features = false } rand = "0.8" rayon = "1" regex = "1" From 8ca3284044fdf4532d5ffeed18840518f22cb102 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:14:23 +0000 Subject: [PATCH 070/150] build(deps): bump typed-builder from 0.18.2 to 0.19.1 Bumps [typed-builder](https://github.com/idanarye/rust-typed-builder) from 0.18.2 to 0.19.1. - [Changelog](https://github.com/idanarye/rust-typed-builder/blob/master/CHANGELOG.md) - [Commits](https://github.com/idanarye/rust-typed-builder/commits) --- updated-dependencies: - dependency-name: typed-builder dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a509d5b1..edf3a9ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2931,18 +2931,18 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typed-builder" -version = "0.18.2" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77739c880e00693faef3d65ea3aad725f196da38b22fdc7ea6ded6e1ce4d3add" +checksum = "a06fbd5b8de54c5f7c91f6fe4cebb949be2125d7758e630bb58b1d831dbce600" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.18.2" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" +checksum = "f9534daa9fd3ed0bd911d462a37f172228077e7abf18c18a5f67199d959205f8" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 04b24fd9..cd435fd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,7 +73,7 @@ toml = "0.8" tracing = "0.1" tracing-chrome = "0.7" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -typed-builder = "0.18" +typed-builder = "0.19" unindent = "0.2" url = { version = "2", features = ["serde"] } uuid = { version = "1", features = ["serde", "v4"] } From 921e2c486ee7fd0f342b0a7b7f19cd911f54a28e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:14:32 +0000 Subject: [PATCH 071/150] build(deps): bump handlebars from 5.1.2 to 6.0.0 Bumps [handlebars](https://github.com/sunng87/handlebars-rust) from 5.1.2 to 6.0.0. - [Release notes](https://github.com/sunng87/handlebars-rust/releases) - [Changelog](https://github.com/sunng87/handlebars-rust/blob/master/CHANGELOG.md) - [Commits](https://github.com/sunng87/handlebars-rust/compare/v5.1.2...v6.0.0) --- updated-dependencies: - dependency-name: handlebars dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a509d5b1..76fc3820 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -968,9 +968,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "5.1.2" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d08485b96a0e6393e9e4d1b8d48cf74ad6c063cd905eb33f42c1ce3f0377539b" +checksum = "5226a0e122dc74917f3a701484482bed3ee86d016c7356836abbaa033133a157" dependencies = [ "log", "pest", diff --git a/Cargo.toml b/Cargo.toml index 04b24fd9..82ae1457 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ filters = "0.4" futures = "0.3" getset = "0.1" git2 = "0.19" -handlebars = { version = "5", features = ["no_logging"] } +handlebars = { version = "6", features = ["no_logging"] } human-panic = "2" humantime = "2" indicatif = "0.17" From d3663499f119730d1c3707c6c8d275e66b3a2a52 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 5 Aug 2024 20:48:22 +0200 Subject: [PATCH 072/150] Support PackageVersionConstraint specification without a "constraint" This is mainly done for consistency. There are currently two ways to specify package/dependency versions: - `PackageVersion`: An exact version. - `PackageVersionConstraint`: A "constraint" character followed by a version. Only `=` is currently supported as "constraint" character though, so the version must be an exact match as well. This means that `PackageVersionConstraint` currently only implements the exact same version matching logic as `PackageVersion` but additionally requires the `=` character in front of the version string. This makes that "constraint" character optional so that it doesn't trigger a parsing error when, e.g., a CLI argument lacks it (it was a bit annoying that some subcommands use `PackageVersionConstraint` and therefore required the `=` in front of the version). Signed-off-by: Michael Weiss --- src/package/dependency/mod.rs | 19 ++++++++++++++++++- src/package/version.rs | 19 +++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 7f6c8c45..ffe96151 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -138,6 +138,24 @@ mod tests { dep_parse_test("7z", "42"); } + #[test] + fn test_dependency_version_without_constraint() { + let name = "foobar"; + let version_constraint = "1.42.37"; + + let dep = Dependency::from(format!("{name} {version_constraint}")); + let (dep_name, dep_version_constraint) = dep.parse_as_name_and_version().unwrap(); + + assert_eq!(dep_name, PackageName::from(name.to_string())); + assert_eq!( + dep_version_constraint, + PackageVersionConstraint::from_version( + String::from("="), + PackageVersion::from(version_constraint.to_string()), + ) + ); + } + #[test] fn test_complex_dependency_parsing() { dep_parse_test("0ad_", "42"); @@ -153,6 +171,5 @@ mod tests { dep_parse_expect_err("a *"); dep_parse_expect_err("a >2"); dep_parse_expect_err("a <2"); - dep_parse_expect_err("a 42"); } } diff --git a/src/package/version.rs b/src/package/version.rs index 6b9c6c86..43b80825 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -28,9 +28,13 @@ pub struct PackageVersionConstraint { impl PackageVersionConstraint { fn parser<'a>() -> PomParser<'a, u8, Self> { - (pom::parser::sym(b'=') + PackageVersion::parser()) + (pom::parser::sym(b'=').opt() + PackageVersion::parser()) .convert(|(constraint, version)| { - String::from_utf8(vec![constraint]).map(|c| (c, version)) + if let Some(c) = constraint { + String::from_utf8(vec![c]).map(|c| (c, version)) + } else { + Ok(("=".to_string(), version)) + } }) .map(|(constraint, version)| PackageVersionConstraint { constraint, @@ -66,7 +70,7 @@ impl TryFrom<&str> for PackageVersionConstraint { PackageVersionConstraint::parser() .parse(s.as_bytes()) .context(anyhow!("Failed to parse the following package version constraint: {}", s)) - .context("A package version constraint must have a comparator (only `=` is currently supported) and a version string, like so: =0.1.0") + .context("A package version constraint must have a version and an optional comparator (only `=` is currently supported, which is also the default), e.g.: =0.1.0") .map_err(Error::from) } } @@ -126,6 +130,10 @@ mod tests { #[test] fn test_parse_version_1() { + assert!(PackageVersion::parser().parse(b"1").is_ok()); + assert!(PackageVersion::parser().parse(b"1.42").is_ok()); + assert!(PackageVersion::parser().parse(b"1.42.37").is_ok()); + assert!(PackageVersion::parser().parse(b"").is_err()); assert!(PackageVersion::parser().parse(b"=").is_err()); assert!(PackageVersion::parser().parse(b"*1").is_err()); @@ -137,6 +145,10 @@ mod tests { assert!(PackageVersion::parser().parse(b"=a1").is_err()); assert!(PackageVersion::parser().parse(b"a").is_err()); + assert!(PackageVersionConstraint::parser().parse(b"1").is_ok()); + assert!(PackageVersionConstraint::parser().parse(b"1.42").is_ok()); + assert!(PackageVersionConstraint::parser().parse(b"1.42.37").is_ok()); + assert!(PackageVersionConstraint::parser().parse(b"").is_err()); assert!(PackageVersionConstraint::parser().parse(b"=").is_err()); assert!(PackageVersionConstraint::parser().parse(b"*1").is_err()); @@ -146,7 +158,6 @@ mod tests { assert!(PackageVersionConstraint::parser().parse(b"=.a").is_err()); assert!(PackageVersionConstraint::parser().parse(b"=.1").is_err()); assert!(PackageVersionConstraint::parser().parse(b"=a1").is_err()); - assert!(PackageVersionConstraint::parser().parse(b"1").is_err()); assert!(PackageVersionConstraint::parser().parse(b"a").is_err()); } From fe0df00b2c2ccbaa8b0aa63eacfdd37b27466fbe Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 5 Aug 2024 21:00:46 +0200 Subject: [PATCH 073/150] Use the semver crate to implement caret requirements The previous commit used the conservative approach to treat `PackageVersionConstraint` without any constraint as `PackageVersion` (exact version match) but we want to eventually implement real package version requirements/constraints so let's use the semver crate for that as it implements Rust's nice version requirement syntax [0]. This is a bit of a dangerous change as `PackageVersionConstraint` may now, for the first time, result in multiple package versions that match (so we must ensure that all usages in the code are correct and will either pick only the newest version or correctly handle all versions). [0]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html Signed-off-by: Michael Weiss --- Cargo.lock | 1 + Cargo.toml | 1 + src/package/dependency/mod.rs | 2 +- src/package/version.rs | 18 ++++++++++++++++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f758a5f2..71716b91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -258,6 +258,7 @@ dependencies = [ "resiter", "rlimit", "rustversion", + "semver", "serde", "serde_json", "sha1", diff --git a/Cargo.toml b/Cargo.toml index 2183ed31..a64430d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,6 +59,7 @@ reqwest = { version = "0.12", features = [ "stream" ] } resiter = "0.5" rlimit = "0.10" rustversion = "1" +semver = "1" serde = "1" serde_json = "1" sha1 = "0.10" diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index ffe96151..9527331c 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -150,7 +150,7 @@ mod tests { assert_eq!( dep_version_constraint, PackageVersionConstraint::from_version( - String::from("="), + String::from(""), PackageVersion::from(version_constraint.to_string()), ) ); diff --git a/src/package/version.rs b/src/package/version.rs index 43b80825..12c7c1c6 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -33,7 +33,7 @@ impl PackageVersionConstraint { if let Some(c) = constraint { String::from_utf8(vec![c]).map(|c| (c, version)) } else { - Ok(("=".to_string(), version)) + Ok(("".to_string(), version)) } }) .map(|(constraint, version)| PackageVersionConstraint { @@ -43,7 +43,21 @@ impl PackageVersionConstraint { } pub fn matches(&self, v: &PackageVersion) -> bool { - self.version == *v + use semver::{Version, VersionReq}; + match self.constraint.as_str() { + "" => { + let constraint = + VersionReq::parse(&(self.constraint.clone() + self.version.as_str())).unwrap(); + let version = Version::parse(v.as_str()).unwrap(); + + constraint.matches(&version) + } + "=" => self.version == *v, + _ => panic!( + "Internal error: Unsupported version constraint: {} (version: {})", + self.constraint, self.version + ), + } } #[cfg(test)] From e66a1d1aa78b8b3f51b26915de036af7080cd332 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 12 Aug 2024 16:45:29 +0200 Subject: [PATCH 074/150] The `VERSION_CONSTRAINT` parameter of `env-of` isn't optional This fixes the documentation/description of the help output. Signed-off-by: Michael Weiss --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index dd390cb0..daecc82c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -583,7 +583,7 @@ pub fn cli() -> Command { .required(true) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), e.g., '=1.0.0'") + .help("A version constraint to search for, e.g., '=1.0.0'") ) ) From 5a5c7d81018e976c5f659cfa93b18ee5db9d0901 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 12 Aug 2024 16:51:02 +0200 Subject: [PATCH 075/150] Only support a single version for the `env-of` command Using a `PackageVersionConstraint` can result in multiple versions of the package matching, in which case butido will output the environment variables of all packages/versions but without any indication which variable belongs to which version (optionally with some variable merging logic). We could support this but for now it seems best to explicitly only support a single version. Signed-off-by: Michael Weiss --- src/cli.rs | 2 +- src/commands/env_of.rs | 9 +++++---- src/util/filters.rs | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index daecc82c..cd286916 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -583,7 +583,7 @@ pub fn cli() -> Command { .required(true) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for, e.g., '=1.0.0'") + .help("The version of the package") ) ) diff --git a/src/commands/env_of.rs b/src/commands/env_of.rs index 7e7173a1..e8e48810 100644 --- a/src/commands/env_of.rs +++ b/src/commands/env_of.rs @@ -15,7 +15,7 @@ use clap::ArgMatches; use tracing::trace; use crate::package::PackageName; -use crate::package::PackageVersionConstraint; +use crate::package::PackageVersion; use crate::repository::Repository; /// Implementation of the "env_of" subcommand @@ -32,7 +32,7 @@ pub async fn env_of(matches: &ArgMatches, repo: Repository) -> Result<()> { let constraint = matches .get_one::("package_version_constraint") .map(|s| s.to_owned()) - .map(PackageVersionConstraint::try_from) + .map(PackageVersion::try_from) .unwrap()?; trace!( "Checking for package with name = {} and version = {:?}", @@ -40,8 +40,9 @@ pub async fn env_of(matches: &ArgMatches, repo: Repository) -> Result<()> { constraint ); - crate::util::filters::build_package_filter_by_name(name) - .and(crate::util::filters::build_package_filter_by_version_constraint(constraint)) + crate::util::filters::build_package_filter_by_name(name).and( + crate::util::filters::build_package_filter_by_version(constraint), + ) }; let mut stdout = std::io::stdout(); diff --git a/src/util/filters.rs b/src/util/filters.rs index ff32b288..2c548e90 100644 --- a/src/util/filters.rs +++ b/src/util/filters.rs @@ -16,7 +16,7 @@ use tracing::trace; use crate::package::Package; use crate::package::PackageName; -use crate::package::PackageVersionConstraint; +use crate::package::PackageVersion; use crate::package::ParseDependency; /// Helper function to build a package filter based on some flags and the package version @@ -79,12 +79,12 @@ pub fn build_package_filter_by_name(name: PackageName) -> impl filters::filter:: } } -pub fn build_package_filter_by_version_constraint( - constraint: PackageVersionConstraint, +pub fn build_package_filter_by_version( + version: PackageVersion, ) -> impl filters::filter::Filter { move |p: &Package| { - trace!("Checking {:?} -> version matches {:?}", p, constraint); - constraint.matches(p.version()) + trace!("Checking {:?} -> version == {}", p, version); + *p.version() == version } } From e19985c32d49b1dcc645665053f46f91fd13036d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 13 Aug 2024 15:18:08 +0200 Subject: [PATCH 076/150] Fix the help/usage output and parsing of the "release new" subcommand The `--all` flag didn't work properly as it expected a value. The old usage (from the error/help output) looks like this: > butido release new [OPTIONS] --to > [VERSION] The position/index of `PKG` and `SUBMIT` are wrong. The `PKG` argument should come after `SUBMIT` but it likely appears before `SUBMIT` in the usage output as it's in a `ArgGroup` with the `--all` flag and flags/options come before arguments with values. I decided to simply swap the indices of `PKG` and `SUBMIT` as it's more important that the usage matches the parsing (-> no unexpected errors) than that it's quicker / more ergonomic to repeat the command with the same submit but a different package. The new usage is now consistent with the parsing: > butido release new [OPTIONS] --to [VERSION] It isn't ideal though that `SUBMIT` is now between `PKG` and `VERSION`! (But it currently seems to be the only combination that works right...) Signed-off-by: Michael Weiss --- src/cli.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index cd286916..15fc5bab 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -900,7 +900,7 @@ pub fn cli() -> Command { .about("Release artifacts") .arg(Arg::new("submit_uuid") .required(true) - .index(1) + .index(2) .value_name("SUBMIT") .help("The submit uuid from which to release a package") .value_parser(uuid::Uuid::parse_str) @@ -917,12 +917,13 @@ pub fn cli() -> Command { ) .arg(Arg::new("package_name") .required(false) - .index(2) + .index(1) .value_name("PKG") .help("The name of the package") .conflicts_with("all-packages") ) .arg(Arg::new("all-packages") + .action(ArgAction::SetTrue) .required(false) .long("all") .help("Release all packages") From 442d1365e6b3b1e1973c132209f23400e6ef1231 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 13 Aug 2024 16:06:20 +0200 Subject: [PATCH 077/150] Properly fix the "release new" subcommand by dropping `--all` I noticed that the approach from the previous commit sometimes(?) still resulted in some issues and it looks like it's a bad idea to mix options/flags and positional arguments/values in a `ArgGroup`. The `all-packages` argument isn't even used in the code (it's sufficient that `package` is not set) so it seems way batter to simply drop the `--all` flag/option and keep `package_name` optional (I've extended the description a bit to properly document the behaviour). I've also restored the original indices of the positional values/arguments to make the usage more ergonomic again. Signed-off-by: Michael Weiss --- src/cli.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 15fc5bab..403c66dd 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -900,9 +900,9 @@ pub fn cli() -> Command { .about("Release artifacts") .arg(Arg::new("submit_uuid") .required(true) - .index(2) + .index(1) .value_name("SUBMIT") - .help("The submit uuid from which to release a package") + .help("The submit UUID from which to release a package") .value_parser(uuid::Uuid::parse_str) ) .arg(Arg::new("release_store_name") @@ -917,21 +917,9 @@ pub fn cli() -> Command { ) .arg(Arg::new("package_name") .required(false) - .index(1) + .index(2) .value_name("PKG") - .help("The name of the package") - .conflicts_with("all-packages") - ) - .arg(Arg::new("all-packages") - .action(ArgAction::SetTrue) - .required(false) - .long("all") - .help("Release all packages") - .conflicts_with("package_name") - ) - .group(ArgGroup::new("package") - .args(["package_name", "all-packages"]) - .required(true) // one of these is required + .help("The name of the package (or, if omitted, release all packages of the submit)") ) .arg(Arg::new("package_version") .required(false) From 6dfd81b591015d5ddbe3e0f2a7339f0babb5806d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 13 Aug 2024 16:36:34 +0200 Subject: [PATCH 078/150] Emit an error if there are no artifacts to release ("release new") It should be safe to assume that users want to release at least a single artifact if they execute the "release new" subcommand so we should emit an error message and unsuccessful exit code if nothing happened (can be the case when there's a typo in the package name and/or version). Signed-off-by: Michael Weiss --- src/commands/release.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/release.rs b/src/commands/release.rs index ac950efb..81664230 100644 --- a/src/commands/release.rs +++ b/src/commands/release.rs @@ -119,6 +119,10 @@ async fn new_release( }; debug!("Artifacts = {:?}", arts); + if arts.is_empty() { + return Err(anyhow!("No matching artifacts found to release")); + } + arts.iter() .filter_map(|art| { art.path_buf() From 4f989eb4ee41c08ba51e57b30be2a648973ae201 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 13 Aug 2024 16:44:18 +0200 Subject: [PATCH 079/150] Fix making the package name/version arguments required ("release rm") The code calls `unwrap()` on both arguments and therefore panics if any of them are not set (`None`). This fixes the specification of both arguments so that the usage is correct and that Clap will emit an error instead of butido panicking/crashing. It also makes sense that both of these arguments are required to avoid accidental deletion of multiple versions up to nuking an entire release store (there's a confirmation prompt but accidentally hitting `y` is enough to confirm it). Signed-off-by: Michael Weiss --- src/cli.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 403c66dd..4e5e1921 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -880,7 +880,7 @@ pub fn cli() -> Command { ) .arg(Arg::new("package_name") - .required(false) + .required(true) .index(1) .value_name("PKG") .help("The name of the package") @@ -888,7 +888,7 @@ pub fn cli() -> Command { ) .arg(Arg::new("package_version") - .required(false) + .required(true) .index(2) .value_name("VERSION") .help("The exact version of the package (string match)") From 1ce0eacfcfe2476de51f940d05509594571bb4ae Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 14 Aug 2024 16:07:59 +0200 Subject: [PATCH 080/150] Fix/improve the help output of the "source" subcommands I noticed a few mistakes in the help/usage strings and added some additional improvements (hopefully/IMO). Signed-off-by: Michael Weiss --- src/cli.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 4e5e1921..bbb58eb0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -770,7 +770,7 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION") - .help("Verify the sources of this package version (optional, if left out, all packages are checked)") + .help("Verify the sources of this package version (optional, if left out, all versions are checked)") ) .arg(Arg::new("matching") @@ -794,13 +794,13 @@ pub fn cli() -> Command { .required(false) .index(1) .value_name("PKG") - .help("Verify the sources of this package (optional, if left out, all packages are checked)") + .help("Show the URL of this package (or all packages, if omitted)") ) .arg(Arg::new("package_version") .required(false) .index(2) .value_name("VERSION") - .help("Verify the sources of this package version (optional, if left out, all packages are checked)") + .help("Show the URL of this package version (or all versions, if omitted)") ) ) .subcommand(Command::new("download") @@ -815,20 +815,20 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("Download the sources of this package version (optional, if left out, all packages are downloaded)") + .help("Download the sources of this package version (optional, if left out, all versions are downloaded)") ) .arg(Arg::new("force") .action(ArgAction::SetTrue) .required(false) .long("force") - .help("Overwrite existing cache entry") + .help("Overwrite existing cache entry (the downloaded source file(s) will be deleted before the re-download starts)") ) .arg(Arg::new("matching") .required(false) .long("matching") .value_name("REGEX") - .help("Download all packages matching a regex with their name") + .help("Download all packages where the package name matches REGEX") ) .group(ArgGroup::new("download-one-or-many") @@ -850,13 +850,13 @@ pub fn cli() -> Command { .required(false) .index(1) .value_name("PKG") - .help("Get the source file paths for this package") + .help("Get the source file paths for this package (or all packages, if omitted)") ) .arg(Arg::new("package_version") .required(false) .index(2) .value_name("VERSION") - .help("Get the source file paths for the package in this version") + .help("Get the source file paths for the package in this version (or all versions, if omitted)") ) ) ) From ea8f54b33eca8b9e3e31902995278314dfb02b02 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 14 Aug 2024 17:03:16 +0200 Subject: [PATCH 081/150] Tweak some CLI help strings for consistency Due to my previous findings, I decided to check all commands / help outputs and those are the final improvements/tweaks I came up with. Signed-off-by: Michael Weiss --- src/cli.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index bbb58eb0..4b07dfda 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -47,7 +47,7 @@ pub fn cli() -> Command { .long("package") .short('p') .value_name("PKG") - .help("Only list releases for package PKG"), + .help("List only releases for package PKG"), ) .arg( Arg::new("limit") @@ -412,7 +412,7 @@ pub fn cli() -> Command { .required(true) .index(1) .value_name("UUID") - .help("The id of the Job") + .help("The job to print the log of") .value_parser(uuid::Uuid::parse_str) ) ) @@ -957,7 +957,7 @@ pub fn cli() -> Command { .required(false) .index(1) .value_name("NAME") - .help("Package name to lint (if not present, every package will be linted") + .help("Package name to lint (if not present, every package will be linted)") ) .arg(Arg::new("package_version") .required(false) @@ -973,7 +973,7 @@ pub fn cli() -> Command { .required(true) .index(1) .value_name("NAME") - .help("Package name to lint (if not present, every package will be linted") + .help("Package name to print the dependency tree of") ) .arg(Arg::new("package_version") .required(false) From 21d11d8cfd398dbca0dc57d67bff4e8587ec7142 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 14 Aug 2024 17:06:10 +0200 Subject: [PATCH 082/150] Lowercase "configured" in the output of the "metrics" command To make that part consistent with the rest of the output and I also found a typo. Signed-off-by: Michael Weiss --- src/commands/metrics.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/metrics.rs b/src/commands/metrics.rs index a610aa56..0ed0cd46 100644 --- a/src/commands/metrics.rs +++ b/src/commands/metrics.rs @@ -128,10 +128,10 @@ pub async fn metrics( r#" Butido release {release} - {configured_endpoints} Configured endpoints - {configured_images} Configured images - {configured_release_stores} Configured release stores - {configured_phases} Configures phases + {configured_endpoints} configured endpoints + {configured_images} configured images + {configured_release_stores} configured release stores + {configured_phases} configured phases {nfiles} files in repository {repo_packages} packages in repository From 8550a1fb9f7221f1509ae8671c1ec61dff0d8204 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 14 Aug 2024 17:11:41 +0200 Subject: [PATCH 083/150] Improve the output (format) of the "metrics" command The old approach seemed unnecessary redundant so I simply switched to giving the visual sections a title instead and added some optional indentation as that looks nicer. It's not perfect but IMO it looks a bit better now and it should certainly be good enough for that command. Signed-off-by: Michael Weiss --- src/commands/metrics.rs | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/commands/metrics.rs b/src/commands/metrics.rs index 0ed0cd46..32f9d3b3 100644 --- a/src/commands/metrics.rs +++ b/src/commands/metrics.rs @@ -128,24 +128,27 @@ pub async fn metrics( r#" Butido release {release} - {configured_endpoints} configured endpoints - {configured_images} configured images - {configured_release_stores} configured release stores - {configured_phases} configured phases + Configuration: + - {configured_endpoints} endpoints + - {configured_images} images + - {configured_release_stores} release stores + - {configured_phases} phases - {nfiles} files in repository - {repo_packages} packages in repository + Repository: + - {nfiles} files + - {repo_packages} packages - {n_artifacts} artifacts in database - {n_endpoints} endpoints in database - {n_envvars} envvars in database - {n_githashes} githashes in database - {n_images} images in database - {n_jobs} jobs in database - {n_packages} packages in database - {n_releasestores} releasestores in database - {n_releases} releases in database - {n_submits} submits in database + Database: + - {n_artifacts} artifacts + - {n_endpoints} endpoints + - {n_envvars} envvars + - {n_githashes} githashes + - {n_images} images + - {n_jobs} jobs + - {n_packages} packages + - {n_releasestores} releasestores + - {n_releases} releases + - {n_submits} submits "#, release = clap::crate_version!(), configured_endpoints = config.docker().endpoints().len(), From 8684f626022f001000df11da4592cd2828b941f0 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Mon, 19 Aug 2024 17:24:51 +0200 Subject: [PATCH 084/150] Remove a redundant clippy allow macro I guess clippy got better Signed-off-by: Nico Steinle --- src/filestore/staging.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs index 4d7d15a4..ac3ee8a8 100644 --- a/src/filestore/staging.rs +++ b/src/filestore/staging.rs @@ -63,8 +63,6 @@ impl StagingStore { if self.0.root_path().is_dir(&path) { None } else { - // Clippy doesn't detect this properly - #[allow(clippy::redundant_clone)] ArtifactPath::new(path.to_path_buf()) .inspect(|r| trace!("Loaded from path {} = {:?}", path.display(), r)) .with_context(|| anyhow!("Loading from path: {}", path.display())) From 7022c5f5633a8158b531a6f1ed86acaab61522fa Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 28 Aug 2024 14:15:20 +0200 Subject: [PATCH 085/150] Update diesel from 2.2.2 to 2.2.3 (security update) This fixes the RUSTSEC-2024-0365 [0] security issue: "Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts". See also GHSA-wq9x-qwcq-mmgf and [1]. [0]: https://rustsec.org/advisories/RUSTSEC-2024-0365.html [1]: https://github.com/science-computing/butido/security/dependabot/17 Signed-off-by: Michael Weiss --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f758a5f2..5b9316ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -607,9 +607,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf97ee7261bb708fa3402fa9c17a54b70e90e3cb98afb3dc8999d5512cb03f94" +checksum = "65e13bab2796f412722112327f3e575601a3e9cdcbe426f0d30dbf43f3f5dc71" dependencies = [ "bitflags 2.6.0", "byteorder", From b455e06258c810255abd8cba6fc7eac32d41b628 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Wed, 14 Aug 2024 14:23:29 +0200 Subject: [PATCH 086/150] Remove deprecated deny.toml fields The fields were deprecated in version 0.14.12. The new default behavior for the fields are: - `unlicensed = "deny"` New default: `deny` - `copyleft = "deny"` New default: `deny` - `allow-osi-fsf-free = "either"` New default: `neither` > It doesn't matter if the license is OSI and/or FSF free, only if it is in the allow (or exception) list. Link to the 0.14.12 changelog: https://github.com/EmbarkStudios/cargo-deny/blob/main/CHANGELOG.md#01412---2024-02-23 This pull request describes the changes and new default behavior in more detail: https://github.com/EmbarkStudios/cargo-deny/pull/611 > This is a follow-up to #606 that actually provides a way to remove the deprecated fields and opt in to the new behavior until the fields are removed and the new behavior becomes the only behavior. Since version 0.16.0 having these fields errors out. https://github.com/EmbarkStudios/cargo-deny/blob/main/CHANGELOG.md#0160---2024-08-02 > ... making the usage of the deprecated fields into errors. The diff in the comments are changes from the current cargo deny template. Signed-off-by: Nico Steinle --- deny.toml | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/deny.toml b/deny.toml index 63499975..453356db 100644 --- a/deny.toml +++ b/deny.toml @@ -1,27 +1,16 @@ [licenses] -# The lint level for crates which do not have a detectable license -unlicensed = "deny" - # List of explictly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.7 short identifier (+ optional exception)]. -allow = ["MPL-2.0"] - -# List of explictly disallowed licenses -# See https://spdx.org/licenses/ for list of possible licenses -# [possible values: any SPDX 3.7 short identifier (+ optional exception)]. -deny = [] - -# The lint level for licenses considered copyleft -copyleft = "deny" - -# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses -# * both - The license will only be approved if it is both OSI-approved *AND* FSF/Free -# * either - The license will be approved if it is either OSI-approved *OR* FSF/Free -# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF/Free -# * fsf-only - The license will be approved if is FSF/Free *AND NOT* OSI-approved -# * neither - The license will be denied if is FSF/Free *OR* OSI-approved -allow-osi-fsf-free = "either" +allow = [ + "Apache-2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "EPL-2.0", + "MIT", + "MPL-2.0", + "Unicode-DFS-2016" +] # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the @@ -48,16 +37,17 @@ allow = [ deny = [ # Each entry the name of a crate and a version range. If version is # not specified, all versions will be matched. - { name = "fuchsia-cprng" } + { crate = "fuchsia-cprng" } ] # Certain crates/versions that will be skipped when doing duplicate detection. skip = [ ] -# Similarly to `skip` allows you to skip certain crates during duplicate detection, -# unlike skip, it also includes the entire tree of transitive dependencies starting at -# the specified crate, up to a certain depth, which is by default infinite +# Similarly to `skip` allows you to skip certain crates during duplicate +# detection. Unlike skip, it also includes the entire tree of transitive +# dependencies starting at the specified crate, up to a certain depth, which is +# by default infinite. skip-tree = [ ] From f6dbf84f40ce9ec96d77767d2d9096dd26711d39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:07:29 +0000 Subject: [PATCH 087/150] build(deps): bump typed-builder from 0.19.1 to 0.20.0 Bumps [typed-builder](https://github.com/idanarye/rust-typed-builder) from 0.19.1 to 0.20.0. - [Changelog](https://github.com/idanarye/rust-typed-builder/blob/master/CHANGELOG.md) - [Commits](https://github.com/idanarye/rust-typed-builder/commits) --- updated-dependencies: - dependency-name: typed-builder dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b9316ad..592e2275 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2931,18 +2931,18 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typed-builder" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06fbd5b8de54c5f7c91f6fe4cebb949be2125d7758e630bb58b1d831dbce600" +checksum = "7e14ed59dc8b7b26cacb2a92bad2e8b1f098806063898ab42a3bd121d7d45e75" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9534daa9fd3ed0bd911d462a37f172228077e7abf18c18a5f67199d959205f8" +checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 2183ed31..aceb4f41 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,7 +73,7 @@ toml = "0.8" tracing = "0.1" tracing-chrome = "0.7" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -typed-builder = "0.19" +typed-builder = "0.20" unindent = "0.2" url = { version = "2", features = ["serde"] } uuid = { version = "1", features = ["serde", "v4"] } From 78f961358b9924519328d04c96db75a93a50733a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 2 Sep 2024 20:37:44 +0200 Subject: [PATCH 088/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 416 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 237 insertions(+), 179 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b9316ad..cdf8b16b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aho-corasick" version = "1.1.3" @@ -107,14 +113,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] name = "ascii_table" -version = "4.0.3" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2bee9b9ee0e5768772e38c07ef0ba23a490d7e1336ec7207c25712a2661c55" +checksum = "ed8a80a95ab122e7cc43bfde1d51949c89ff67e0c76eb795dc045003418473e2" dependencies = [ "lazy_static", "regex", @@ -123,13 +129,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -154,7 +160,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -268,7 +274,7 @@ dependencies = [ "terminal_size", "tokio", "tokio-stream", - "toml 0.8.18", + "toml 0.8.19", "tracing", "tracing-chrome", "tracing-subscriber", @@ -296,9 +302,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bytesize" @@ -308,9 +314,9 @@ checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -340,12 +346,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.7" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -371,18 +378,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.12" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53aa12ec67affac065e7c7dd20a42fa2a4094921b655711d5d3107bb3d52bed" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.12" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbdf2dd5fe10889e0c61942ff5d948aaf12fd0b4504408ab0cbb1916c2cffa9" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -392,9 +399,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.12" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8670053e87c316345e384ca1f3eba3006fc6355ed8b8a1140d104e109e3df34" +checksum = "6d7db6eca8c205649e8d3ccd05aa5042b1800a784e56bc7c43524fde8abbfa9b" dependencies = [ "clap", ] @@ -460,15 +467,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -569,7 +576,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -580,7 +587,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -624,15 +631,15 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ff2be1e7312c858b2ef974f5c7089833ae57b5311b334b30923af58e5718d8" +checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -652,7 +659,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -676,7 +683,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -718,20 +725,20 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -748,12 +755,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -842,7 +849,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -943,18 +950,18 @@ dependencies = [ [[package]] name = "git_info" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641b847f0375f4b2c595438eefc17a9c0fbf47b400cbdd1ad9332bf1e16b779d" +checksum = "9525474359e360de19580a77590f3491c94d57b1ef2b8bd468877a83cbc7f4cb" [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", - "bytes 1.7.0", + "bytes 1.7.1", "fnv", "futures-core", "futures-sink", @@ -1019,7 +1026,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "fnv", "itoa", ] @@ -1030,7 +1037,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "fnv", "itoa", ] @@ -1041,7 +1048,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "http 0.2.12", "pin-project-lite", ] @@ -1052,7 +1059,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "http 1.1.0", ] @@ -1062,7 +1069,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "futures-util", "http 1.1.0", "http-body 1.0.1", @@ -1093,7 +1100,7 @@ dependencies = [ "os_info", "serde", "serde_derive", - "toml 0.8.18", + "toml 0.8.19", "uuid", ] @@ -1109,7 +1116,7 @@ version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "futures-channel", "futures-core", "futures-util", @@ -1132,7 +1139,7 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "futures-channel", "futures-util", "h2", @@ -1187,7 +1194,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "http-body-util", "hyper 1.4.1", "hyper-util", @@ -1199,11 +1206,11 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "futures-channel", "futures-util", "http 1.1.0", @@ -1290,9 +1297,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -1373,9 +1380,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1388,9 +1395,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libgit2-sys" @@ -1406,6 +1413,17 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall", +] + [[package]] name = "libssh2-sys" version = "0.3.0" @@ -1422,9 +1440,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -1491,7 +1509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", - "toml 0.8.18", + "toml 0.8.19", ] [[package]] @@ -1526,11 +1544,20 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", @@ -1607,9 +1634,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -1665,7 +1692,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -1721,7 +1748,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -1748,7 +1775,7 @@ dependencies = [ "regex", "regex-syntax 0.8.4", "structmeta", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -1794,7 +1821,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -1855,7 +1882,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -1912,9 +1939,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ "zerocopy", ] @@ -1981,9 +2008,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2049,15 +2076,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.3" @@ -2069,9 +2087,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -2113,12 +2131,12 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", - "bytes 1.7.0", + "bytes 1.7.1", "encoding_rs", "futures-core", "futures-util", @@ -2153,7 +2171,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg", + "windows-registry", ] [[package]] @@ -2179,9 +2197,9 @@ dependencies = [ [[package]] name = "rlimit" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3560f70f30a0f16d11d01ed078a07740fe6b489667abc7c7b029155d9f21c3d8" +checksum = "7043b63bd0cd1aaa628e476b80e6d4023a3b50eb32789f2728908107bd0c793a" dependencies = [ "libc", ] @@ -2194,9 +2212,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -2220,9 +2238,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64 0.22.1", "rustls-pki-types", @@ -2230,15 +2248,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring", "rustls-pki-types", @@ -2324,29 +2342,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.121" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", "memchr", @@ -2420,7 +2438,7 @@ checksum = "1e468265908f45299c26571dad9a2e5cb3656eceb51cd58f1441cf61aa71aad6" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.7.0", + "bytes 1.7.1", "chrono", "flate2", "futures-util", @@ -2439,6 +2457,12 @@ dependencies = [ "url", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2494,7 +2518,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -2505,7 +2529,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -2527,9 +2551,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -2541,6 +2565,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "syntect" @@ -2566,20 +2593,20 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -2598,14 +2625,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2635,7 +2663,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -2698,12 +2726,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", - "bytes 1.7.0", + "bytes 1.7.1", "libc", "mio", "pin-project-lite", @@ -2721,7 +2749,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -2774,7 +2802,7 @@ version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ - "bytes 1.7.0", + "bytes 1.7.1", "futures-core", "futures-sink", "pin-project-lite", @@ -2792,9 +2820,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b98404c41291d0a0fba7148837d26858b42e57f7abe5a4865ff39dc35d1d8c" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -2813,9 +2841,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.19" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4866f4796a39e03923b14f9a42e88f223e2e685ee1851041e510c0134850c27f" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", @@ -2841,15 +2869,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -2870,7 +2898,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -2946,7 +2974,7 @@ checksum = "f9534daa9fd3ed0bd911d462a37f172228077e7abf18c18a5f67199d959205f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -3087,34 +3115,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3124,9 +3153,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3134,22 +3163,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-streams" @@ -3166,9 +3195,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3176,9 +3205,9 @@ dependencies = [ [[package]] name = "which" -version = "6.0.2" +version = "6.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d9c5ed668ee1f17edb3b627225343d210006a90bb1e3745ce1f30b1fb115075" +checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" dependencies = [ "either", "home", @@ -3204,11 +3233,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3226,6 +3255,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3244,6 +3303,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -3367,23 +3435,13 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.17" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b68c91a1b24c7456960ac3290e86a316f3aefcda89c4cad24ae3eda34f4411" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "winsafe" version = "0.0.19" @@ -3418,9 +3476,9 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.6.6" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", "zerocopy-derive", @@ -3428,13 +3486,13 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.6.6" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] From eaf7657c7a38aa43bc17bb60d434fd564fe2d33e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 2 Sep 2024 20:59:55 +0200 Subject: [PATCH 089/150] Bump the MSRV to 1.80.0 to enable dependabot's parse-display update This is required for updating the `parse-display` crate to version 0.10.0 as dependabot does in this PR (#412). Signed-off-by: Michael Weiss --- .github/workflows/cargo.yml | 8 ++++---- Cargo.toml | 2 +- README.md | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 1a067d05..d7725fcb 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -14,7 +14,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@v1 with: - toolchain: 1.78.0 # MSRV + toolchain: 1.80.0 # MSRV components: rustfmt - name: Run cargo fmt @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.78.0 # MSRV + - 1.80.0 # MSRV - stable - beta @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.78.0 # MSRV + - 1.80.0 # MSRV - stable - beta steps: @@ -99,7 +99,7 @@ jobs: fail-fast: false matrix: include: - - rust: 1.78.0 # MSRV + - rust: 1.80.0 # MSRV optional: false - rust: beta optional: true diff --git a/Cargo.toml b/Cargo.toml index 2183ed31..93ed96ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ authors = [ "Michael Weiss ", # @primeos-work ] edition = "2021" -rust-version = "1.78.0" # MSRV +rust-version = "1.80.0" # MSRV license = "EPL-2.0" description = "Linux package tool utilizing Docker, PostgreSQL, and TOML" diff --git a/README.md b/README.md index 1f75a36d..b219a86d 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Building butido is easy, assuming you have a Rust installation: cargo build --release # (remove --release for a debug build) ``` -Butido is built and tested with Rust 1.78.0 as MSRV. +Butido is built and tested with Rust 1.80.0 as MSRV. ### (Development) Setup From cd34bda64c0893cc8a167b490f3f0ba96fe3e638 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:07:39 +0000 Subject: [PATCH 090/150] build(deps): bump parse-display from 0.9.1 to 0.10.0 Bumps [parse-display](https://github.com/frozenlib/parse-display) from 0.9.1 to 0.10.0. - [Changelog](https://github.com/frozenlib/parse-display/blob/master/CHANGELOG.md) - [Commits](https://github.com/frozenlib/parse-display/compare/v0.9.1...v0.10.0) --- updated-dependencies: - dependency-name: parse-display dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b9316ad..3d19b9a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1728,9 +1728,9 @@ dependencies = [ [[package]] name = "parse-display" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" +checksum = "287d8d3ebdce117b8539f59411e4ed9ec226e0a4153c7f55495c6070d68e6f72" dependencies = [ "parse-display-derive", "regex", @@ -1739,9 +1739,9 @@ dependencies = [ [[package]] name = "parse-display-derive" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae7800a4c974efd12df917266338e79a7a74415173caf7e70aa0a0707345281" +checksum = "7fc048687be30d79502dea2f623d052f3a074012c6eac41726b7ab17213616b1" dependencies = [ "proc-macro2", "quote", @@ -2069,9 +2069,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 93ed96ad..5d889cea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ indicatif = "0.17" indoc = "2" itertools = "0.13" lazy_static = "1" -parse-display = "0.9" +parse-display = "0.10" pom = "3" ptree = { version = "0.5", default-features = false } rand = "0.8" From 1a9582db920eab4b7776a173c3a165ebabb4a949 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 19:50:07 +0000 Subject: [PATCH 091/150] build(deps): bump EmbarkStudios/cargo-deny-action from 1 to 2 Bumps [EmbarkStudios/cargo-deny-action](https://github.com/embarkstudios/cargo-deny-action) from 1 to 2. - [Release notes](https://github.com/embarkstudios/cargo-deny-action/releases) - [Commits](https://github.com/embarkstudios/cargo-deny-action/compare/v1...v2) --- updated-dependencies: - dependency-name: EmbarkStudios/cargo-deny-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/cargo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index d7725fcb..25334f77 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -86,7 +86,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: EmbarkStudios/cargo-deny-action@v1 + - uses: EmbarkStudios/cargo-deny-action@v2 with: command: check ${{ matrix.checks }} From 87e967c81260a9c9fd07aceb8068e6aad3a9a5c5 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 3 Sep 2024 14:23:12 +0200 Subject: [PATCH 092/150] Add documentation links for cargo-deny Especially the link to the cargo-deny book should be useful for quickly looking up the available configuration settings and their documentation. Signed-off-by: Michael Weiss --- .github/workflows/cargo.yml | 3 ++- deny.toml | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 25334f77..21952713 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -81,11 +81,12 @@ jobs: - advisories - bans licenses sources - # Prevent sudden announcement of a new advisory from failing ci: + # Prevent sudden announcement of a new advisory from failing CI: continue-on-error: ${{ matrix.checks == 'advisories' }} steps: - uses: actions/checkout@v4 + # https://github.com/EmbarkStudios/cargo-deny-action: - uses: EmbarkStudios/cargo-deny-action@v2 with: command: check ${{ matrix.checks }} diff --git a/deny.toml b/deny.toml index 453356db..7f078569 100644 --- a/deny.toml +++ b/deny.toml @@ -1,5 +1,10 @@ +# Documentation for this configuration file: +# https://embarkstudios.github.io/cargo-deny/checks/cfg.html + +# GitHub link: https://github.com/EmbarkStudios/cargo-deny + [licenses] -# List of explictly allowed licenses +# List of explicitly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.7 short identifier (+ optional exception)]. allow = [ From ef6053fc826401e370da01631b7adf150da2f789 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 3 Sep 2024 14:31:35 +0200 Subject: [PATCH 093/150] Let cargo-deny ignore that the yaml-rust crate is unmaintained This isn't a security issue yet, the `syntect` crate should get rid of it eventually, and this isn't really actionable for us so let's ignore that informative advisory so that CI remains green (it's an optional CI check but the failure could mask real vulnerabilities and does also mark the CI run with a red cross on the GitHub UI). Signed-off-by: Michael Weiss --- deny.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deny.toml b/deny.toml index 7f078569..757a4ae8 100644 --- a/deny.toml +++ b/deny.toml @@ -59,4 +59,9 @@ skip-tree = [ [advisories] ignore = [ + # Ignore an "INFO Unmaintained" advisory for the yaml-rust crate that the + # "syntect" crate uses. This can be removed once + # https://github.com/trishume/syntect/issues/537 is resolved (replace + # yaml-rust with yaml-rust2): + { id = "RUSTSEC-2024-0320", reason = "Only an informative advisory that the crate is unmaintained and the maintainer unreachable" }, ] From 99decf14c8883953e1912ce30e6c779c3a8237fb Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Thu, 22 Aug 2024 17:29:27 +0200 Subject: [PATCH 094/150] Add support for generating dependency DOT graphs - New `--dot` argument for the `tree-of` command. - Add `petgraph` as a dependency Decided to use Petgraph instead of graphviz-rust because it integrates with the daggy crate and looks better maintained. - Using dotted lines for build dependencies. Fixes #378 Signed-off-by: Nico Steinle --- Cargo.lock | 1 + Cargo.toml | 1 + src/cli.rs | 6 +++++ src/commands/tree_of.rs | 54 +++++++++++++++++++++++++++++++++++------ src/package/package.rs | 4 +++ 5 files changed, 58 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e1e90fe..efc7d348 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -255,6 +255,7 @@ dependencies = [ "itertools 0.13.0", "lazy_static", "parse-display", + "petgraph", "pom", "ptree", "rand", diff --git a/Cargo.toml b/Cargo.toml index b98e74c2..4150a852 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,7 @@ indoc = "2" itertools = "0.13" lazy_static = "1" parse-display = "0.10" +petgraph = "0.6" pom = "3" ptree = { version = "0.5", default-features = false } rand = "0.8" diff --git a/src/cli.rs b/src/cli.rs index dd390cb0..dde71420 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1019,6 +1019,12 @@ pub fn cli() -> Command { conditions on dependencies. "#)) ) + .arg(Arg::new("dot") + .action(ArgAction::SetTrue) + .required(false) + .long("dot") + .help("Output the dependency DAG in the Graphviz DOT format") + ) ) .subcommand(Command::new("metrics") diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index ea2f2df4..f4e990e5 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -13,11 +13,15 @@ use anyhow::Error; use anyhow::Result; use clap::ArgMatches; +use petgraph::dot::Dot; +use petgraph::graph::DiGraph; use resiter::AndThen; use crate::config::Configuration; use crate::package::condition::ConditionData; use crate::package::Dag; +use crate::package::DependencyType; +use crate::package::Package; use crate::package::PackageName; use crate::package::PackageVersionConstraint; use crate::repository::Repository; @@ -54,7 +58,10 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat env: &additional_env, }; - repo.packages() + let dot = matches.get_flag("dot"); + + let package_dags = repo + .packages() .filter(|p| pname.as_ref().map(|n| p.name() == n).unwrap_or(true)) .filter(|p| { pvers @@ -62,12 +69,43 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat .map(|v| v.matches(p.version())) .unwrap_or(true) }) - .map(|package| Dag::for_root_package(package.clone(), &repo, None, &condition_data)) - .and_then_ok(|tree| { - let stdout = std::io::stdout(); - let mut outlock = stdout.lock(); + .map(|package| Dag::for_root_package(package.clone(), &repo, None, &condition_data)); - ptree::write_tree(&tree.display(), &mut outlock).map_err(Error::from) - }) - .collect::>() + if dot { + package_dags + .and_then_ok(|dag| { + let petgraph: DiGraph = (*dag.dag()).clone().into(); + + let dot = Dot::with_attr_getters( + &petgraph, + &[ + petgraph::dot::Config::EdgeNoLabel, + petgraph::dot::Config::NodeNoLabel, + ], + &|_, er| { + format!( + "{} ", + match er.weight() { + DependencyType::Build => "style = \"dotted\"", + _ => "", + } + ) + }, + &|_, node| format!("label = \"{}\" ", node.1.clone().display_name_version()), + ); + + println!("{:?}", dot); + Ok(()) + }) + .collect::>() + } else { + package_dags + .and_then_ok(|tree| { + let stdout = std::io::stdout(); + let mut outlock = stdout.lock(); + + ptree::write_tree(&tree.display(), &mut outlock).map_err(Error::from) + }) + .collect::>() + } } diff --git a/src/package/package.rs b/src/package/package.rs index e24490ab..15c75322 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -100,6 +100,10 @@ impl Package { } } + pub fn display_name_version(self) -> String { + format!("{} {}", self.name, self.version) + } + #[cfg(test)] pub fn set_dependencies(&mut self, dependencies: Dependencies) { self.dependencies = dependencies; From 3f6454bf9ec7ca78fdd27c8c6ae0b34e699655ba Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 11 Sep 2024 21:30:35 +0200 Subject: [PATCH 095/150] Refactor the DOT implementation for `tree-of` a bit This is only a minor refactoring to keep the original structure (a bit more compact and "nicer"), avoid an unnecessary `clone()`, and list `DependencyType::Runtime` explicitly in the `match` to alert us if we would ever add other variants. Signed-off-by: Michael Weiss --- src/commands/tree_of.rs | 29 +++++++++++------------------ src/package/package.rs | 2 +- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index f4e990e5..95d7604b 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -60,8 +60,7 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat let dot = matches.get_flag("dot"); - let package_dags = repo - .packages() + repo.packages() .filter(|p| pname.as_ref().map(|n| p.name() == n).unwrap_or(true)) .filter(|p| { pvers @@ -69,11 +68,9 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat .map(|v| v.matches(p.version())) .unwrap_or(true) }) - .map(|package| Dag::for_root_package(package.clone(), &repo, None, &condition_data)); - - if dot { - package_dags - .and_then_ok(|dag| { + .map(|package| Dag::for_root_package(package.clone(), &repo, None, &condition_data)) + .and_then_ok(|dag| { + if dot { let petgraph: DiGraph = (*dag.dag()).clone().into(); let dot = Dot::with_attr_getters( @@ -87,25 +84,21 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat "{} ", match er.weight() { DependencyType::Build => "style = \"dotted\"", - _ => "", + DependencyType::Runtime => "", } ) }, - &|_, node| format!("label = \"{}\" ", node.1.clone().display_name_version()), + &|_, node| format!("label = \"{}\" ", node.1.display_name_version()), ); println!("{:?}", dot); Ok(()) - }) - .collect::>() - } else { - package_dags - .and_then_ok(|tree| { + } else { let stdout = std::io::stdout(); let mut outlock = stdout.lock(); - ptree::write_tree(&tree.display(), &mut outlock).map_err(Error::from) - }) - .collect::>() - } + ptree::write_tree(&dag.display(), &mut outlock).map_err(Error::from) + } + }) + .collect::>() } diff --git a/src/package/package.rs b/src/package/package.rs index 15c75322..7e7b845d 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -100,7 +100,7 @@ impl Package { } } - pub fn display_name_version(self) -> String { + pub fn display_name_version(&self) -> String { format!("{} {}", self.name, self.version) } From 229de9c6c6592d4a546ae156d5ecff64d50b82d3 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 11 Sep 2024 22:03:24 +0200 Subject: [PATCH 096/150] Update "getset" to get rid of the "proc-macro-error" dependency There is an "INFO Unmaintained" advisory for the "proc-macro-error" crate (RUSTSEC-2024-0370) so let's get rid of it where possible. Signed-off-by: Michael Weiss --- Cargo.lock | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index efc7d348..869d4ccd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -918,14 +918,14 @@ dependencies = [ [[package]] name = "getset" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" +checksum = "f636605b743120a8d32ed92fc27b6cde1a769f8f936c065151eb66f88ded513c" dependencies = [ - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -1980,6 +1980,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "proc-macro2" version = "1.0.86" From 97bd303b0091f31685372e33796b3d9a6ba43c5a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 11 Sep 2024 22:06:23 +0200 Subject: [PATCH 097/150] Let cargo-deny ignore that the proc-macro-error crate is unmaintained This isn't a security issue yet, the `aquamarine` crate should get rid of it eventually, and this isn't really actionable for us so let's ignore that informative advisory so that CI remains green (it's an optional CI check but the failure could mask real vulnerabilities and does also mark the CI run with a red cross on the GitHub UI). https://rustsec.org/advisories/RUSTSEC-2024-0370: > proc-macro-error's maintainer seems to be unreachable, with no commits > for 2 years, no releases pushed for 4 years, and no activity on the > GitLab repo or response to email. > proc-macro-error also depends on syn 1.x, which may be bringing > duplicate dependencies into dependant build trees. Signed-off-by: Michael Weiss --- deny.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deny.toml b/deny.toml index 757a4ae8..61c71531 100644 --- a/deny.toml +++ b/deny.toml @@ -64,4 +64,9 @@ ignore = [ # https://github.com/trishume/syntect/issues/537 is resolved (replace # yaml-rust with yaml-rust2): { id = "RUSTSEC-2024-0320", reason = "Only an informative advisory that the crate is unmaintained and the maintainer unreachable" }, + # Ignore an "INFO Unmaintained" advisory for the proc-macro-error crate + # that the "aquamarine" crate uses. This can be removed once + # https://github.com/mersinvald/aquamarine/issues/45 is resolved (Move away + # from proc-macro-error): + { id = "RUSTSEC-2024-0370", reason = "Only an informative advisory that the crate is unmaintained and the maintainer unreachable" }, ] From ad1eff4255b1953c7d52d71636f3688e1276b4c9 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 11 Sep 2024 22:25:09 +0200 Subject: [PATCH 098/150] Let the `download_manually` source property default to `false` This is an optional setting that should only have to be set for sources that have to be downloaded manually. The example in `examples/packages/repo/pkg.toml` isn't a proper default as it only applies to the source "src" (packages could have multiples sources or choose a different name). Signed-off-by: Michael Weiss --- examples/packages/repo/pkg.toml | 1 - src/package/source.rs | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/packages/repo/pkg.toml b/examples/packages/repo/pkg.toml index 0cad9544..2909ba44 100644 --- a/examples/packages/repo/pkg.toml +++ b/examples/packages/repo/pkg.toml @@ -7,7 +7,6 @@ runtime = [] [sources.src] hash.type = "sha1" -download_manually = false [phases] diff --git a/src/package/source.rs b/src/package/source.rs index eb62eac4..cfdd6cf2 100644 --- a/src/package/source.rs +++ b/src/package/source.rs @@ -17,12 +17,20 @@ use serde::Serialize; use tracing::trace; use url::Url; +fn default_download_manually() -> bool { + false +} + #[derive(Clone, Debug, Serialize, Deserialize, Getters)] pub struct Source { #[getset(get = "pub")] url: Url, #[getset(get = "pub")] hash: SourceHash, + + // This is only required for some special packages that cannot be downloaded automatically for + // various reasons so it defaults to `false`: + #[serde(default = "default_download_manually")] #[getset(get = "pub")] download_manually: bool, } From e446e2f0e84364b731566cdfbbf3d7d6b9648b0e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 13 Sep 2024 21:03:11 +0200 Subject: [PATCH 099/150] Display the artifact file suffix/type in the "db jobs" output This adds a new column ("Type") to the table that "butido db jobs" outputs. It works under the assumption that the artifact file names indicate the type of artifact via a file name extension [0] (i.e., using the format "{name}.{type}"). The fallback values are "-" if no artifact is available (build failures, aborted jobs, etc. - that's also why we're using LEFT JOIN) or "?" (for unknown) if no file name extension was detected. This resolves #391. [0]: https://en.wikipedia.org/wiki/Filename_extension Signed-off-by: Michael Weiss --- src/commands/db.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/commands/db.rs b/src/commands/db.rs index 108f9539..b21f5f4e 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -491,7 +491,7 @@ fn jobs( ) -> Result<()> { let csv = matches.get_flag("csv"); let hdrs = crate::commands::util::mk_header(vec![ - "Submit", "Job", "Time", "Host", "Ok?", "Package", "Version", "Distro", + "Submit", "Job", "Time", "Host", "Ok?", "Package", "Version", "Distro", "Type", ]); let mut conn = conn_cfg.establish_connection()?; let older_than_filter = get_date_filter("older_than", matches)?; @@ -502,6 +502,7 @@ fn jobs( .inner_join(schema::endpoints::table) .inner_join(schema::packages::table) .inner_join(schema::images::table) + .left_outer_join(schema::artifacts::table) .into_boxed(); if let Some(submit_uuid) = matches.get_one::("submit_uuid") { @@ -574,14 +575,25 @@ fn jobs( models::Endpoint, models::Package, models::Image, + Option, )>(&mut conn)? .into_iter() .rev() // required for the --limit implementation - .map(|(job, submit, ep, package, image)| { + .map(|(job, submit, ep, package, image, artifact)| { let success = is_job_successfull(&job)? .map(|b| if b { "yes" } else { "no" }) .map(String::from) .unwrap_or_else(|| String::from("?")); + let artifact_type = if let Some(artifact) = artifact { + artifact + .path + .split(".") + .last() + .map(str::to_uppercase) + .unwrap_or(String::from("?")) + } else { + String::from("-") + }; Ok(vec![ submit.uuid.to_string(), @@ -592,6 +604,7 @@ fn jobs( package.name, package.version, image_name_lookup.shorten(&image.name), + artifact_type, ]) }) .collect::>>()?; From b0c18a8391372a7b3aa1d28572ba07d0108afeba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:18:52 +0000 Subject: [PATCH 100/150] build(deps): bump terminal_size from 0.3.0 to 0.4.0 Bumps [terminal_size](https://github.com/eminence/terminal-size) from 0.3.0 to 0.4.0. - [Release notes](https://github.com/eminence/terminal-size/releases) - [Commits](https://github.com/eminence/terminal-size/compare/v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: terminal_size dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 869d4ccd..1876cef8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2661,12 +2661,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4150a852..447df79c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ sha2 = "0.10" shiplift = "0.7" syntect = "5" tar = "0.4" -terminal_size = "0.3" +terminal_size = "0.4" tokio = { version = "1", features = ["macros", "fs", "process", "io-util", "time"] } tokio-stream = "0.1" toml = "0.8" From 45181adabaf981c87bed8d5d02afa15e974e0d04 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 2 Oct 2024 19:54:13 +0200 Subject: [PATCH 101/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 386 ++++++++++++++++++++++++----------------------------- 1 file changed, 178 insertions(+), 208 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 869d4ccd..226401c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,13 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -98,9 +92,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "aquamarine" @@ -113,7 +107,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -129,13 +123,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -146,23 +140,23 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -214,7 +208,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.8", "serde", ] @@ -303,9 +297,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "bytesize" @@ -347,9 +341,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.15" +version = "1.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" dependencies = [ "jobserver", "libc", @@ -379,18 +373,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" dependencies = [ "anstream", "anstyle", @@ -400,9 +394,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.24" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7db6eca8c205649e8d3ccd05aa5042b1800a784e56bc7c43524fde8abbfa9b" +checksum = "74a01f4f9ee6c066d42a1c8dedf0dcddad16c72a8981a309d6398de3a75b0c39" dependencies = [ "clap", ] @@ -474,9 +468,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -577,7 +571,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -588,7 +582,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -615,9 +609,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.3" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e13bab2796f412722112327f3e575601a3e9cdcbe426f0d30dbf43f3f5dc71" +checksum = "158fe8e2e68695bd615d7e4f3227c0727b151330d3e253b525086c348d055d5e" dependencies = [ "bitflags 2.6.0", "byteorder", @@ -640,7 +634,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -660,7 +654,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -684,7 +678,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -756,12 +750,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -850,7 +844,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -925,14 +919,14 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "git2" @@ -962,7 +956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", - "bytes 1.7.1", + "bytes 1.7.2", "fnv", "futures-core", "futures-sink", @@ -976,9 +970,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5226a0e122dc74917f3a701484482bed3ee86d016c7356836abbaa033133a157" +checksum = "ce25b617d1375ef96eeb920ae717e3da34a02fc979fe632c75128350f9e1f74a" dependencies = [ "log", "pest", @@ -990,9 +984,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -1027,7 +1021,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "fnv", "itoa", ] @@ -1038,7 +1032,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "fnv", "itoa", ] @@ -1049,7 +1043,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "http 0.2.12", "pin-project-lite", ] @@ -1060,7 +1054,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "http 1.1.0", ] @@ -1070,7 +1064,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "futures-util", "http 1.1.0", "http-body 1.0.1", @@ -1079,9 +1073,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1117,7 +1111,7 @@ version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "futures-channel", "futures-core", "futures-util", @@ -1140,7 +1134,7 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "futures-channel", "futures-util", "h2", @@ -1174,9 +1168,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", @@ -1195,7 +1189,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "http-body-util", "hyper 1.4.1", "hyper-util", @@ -1207,11 +1201,11 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "futures-channel", "futures-util", "http 1.1.0", @@ -1220,7 +1214,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1240,9 +1233,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1298,9 +1291,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", @@ -1336,9 +1329,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_terminal_polyfill" @@ -1396,9 +1389,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libgit2-sys" @@ -1536,15 +1529,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -1644,9 +1628,12 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "onig" @@ -1693,7 +1680,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1762,7 +1749,7 @@ checksum = "287d8d3ebdce117b8539f59411e4ed9ec226e0a4153c7f55495c6070d68e6f72" dependencies = [ "parse-display-derive", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -1774,9 +1761,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "structmeta", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1793,9 +1780,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" dependencies = [ "memchr", "thiserror", @@ -1804,9 +1791,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" dependencies = [ "pest", "pest_generator", @@ -1814,22 +1801,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" dependencies = [ "once_cell", "pest", @@ -1883,7 +1870,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1900,9 +1887,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plist" @@ -1928,9 +1915,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -1949,9 +1936,9 @@ dependencies = [ [[package]] name = "pq-sys" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24ff9e4cf6945c988f0db7005d87747bf72864965c3529d259ad155ac41d584" +checksum = "f6cc05d7ea95200187117196eee9edd0644424911821aeb28a18ce60ea0b8793" dependencies = [ "vcpkg", ] @@ -1999,7 +1986,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2101,23 +2088,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -2131,13 +2118,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -2148,18 +2135,18 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.1", - "bytes 1.7.1", + "bytes 1.7.2", "encoding_rs", "futures-core", "futures-util", @@ -2235,9 +2222,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -2248,9 +2235,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "once_cell", "rustls-pki-types", @@ -2261,25 +2248,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" -version = "0.102.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2309,11 +2295,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2346,9 +2332,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -2365,29 +2351,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -2397,9 +2383,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -2461,7 +2447,7 @@ checksum = "1e468265908f45299c26571dad9a2e5cb3656eceb51cd58f1441cf61aa71aad6" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.7.1", + "bytes 1.7.2", "chrono", "flate2", "futures-util", @@ -2541,7 +2527,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2552,7 +2538,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2574,9 +2560,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -2605,7 +2591,7 @@ dependencies = [ "once_cell", "onig", "plist", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "serde", "serde_derive", "serde_json", @@ -2637,9 +2623,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -2648,9 +2634,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -2671,22 +2657,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2754,7 +2740,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", - "bytes 1.7.1", + "bytes 1.7.2", "libc", "mio", "pin-project-lite", @@ -2772,7 +2758,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2787,11 +2773,10 @@ dependencies = [ [[package]] name = "tokio-openssl" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ffab79df67727f6acf57f1ff743091873c24c579b1e2ce4d8f53e47ded4d63d" +checksum = "59df6849caa43bb7567f9a36f863c447d95a11d5903c9cc334ba32576a27eadd" dependencies = [ - "futures-util", "openssl", "openssl-sys", "tokio", @@ -2810,9 +2795,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -2821,11 +2806,11 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ - "bytes 1.7.1", + "bytes 1.7.2", "futures-core", "futures-sink", "pin-project-lite", @@ -2864,9 +2849,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -2875,21 +2860,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project 1.1.5", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.3" @@ -2921,7 +2891,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2997,7 +2967,7 @@ checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3008,36 +2978,36 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unindent" @@ -3158,7 +3128,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -3192,7 +3162,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3205,9 +3175,9 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -3458,9 +3428,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -3515,7 +3485,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] From cd21bb65206e5fe589aa80e52386a12dd41eb593 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Mon, 14 Oct 2024 14:55:16 +0200 Subject: [PATCH 102/150] Implement package filtering as a repo method - Moved the package filtering logic from `download` and `verify` functions into a new `search_packages` method in the `Repository` struct. - Updated `download` and `verify` functions to use the new `search_packages` method. This refactor improves code reuse and readability by centralizing the package filtering logic. Fixes #428 We already fixed this for the download function in 76a3cde. The package filtering for the verifying function was implemented in the same way but didn't fail yet. Signed-off-by: Nico Steinle --- src/commands/source/download.rs | 34 ++-------------------------- src/commands/source/mod.rs | 16 +------------- src/repository/repository.rs | 39 +++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 47 deletions(-) diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index 73244eac..c9a282ac 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -229,38 +229,8 @@ pub async fn download( NUMBER_OF_MAX_CONCURRENT_DOWNLOADS, )); - let mut r = repo.packages() - .filter(|p| { - match (pname.as_ref(), pvers.as_ref(), matching_regexp.as_ref()) { - (None, None, None) => true, - (Some(pname), None, None) => p.name() == pname, - (Some(pname), Some(vers), None) => p.name() == pname && vers.matches(p.version()), - (None, None, Some(regex)) => regex.is_match(p.name()), - - (_, _, _) => { - panic!("This should not be possible, either we select packages by name and (optionally) version, or by regex.") - }, - } - }).peekable(); - - // check if the iterator is empty - if r.peek().is_none() { - let pname = matches.get_one::("package_name"); - let pvers = matches.get_one::("package_version"); - let matching_regexp = matches.get_one::("matching"); - - match (pname, pvers, matching_regexp) { - (Some(pname), None, None) => return Err(anyhow!("{} not found", pname)), - (Some(pname), Some(vers), None) => return Err(anyhow!("{} {} not found", pname, vers)), - (None, None, Some(regex)) => return Err(anyhow!("{} regex not found", regex)), - - (_, _, _) => { - panic!("This should not be possible, either we select packages by name and (optionally) version, or by regex.") - } - } - } - - let r = r + let r = repo + .search_packages(&pname, &pvers, &matching_regexp)? .flat_map(|p| { sc.sources_for(p).into_iter().map(|source| { let download_sema = download_sema.clone(); diff --git a/src/commands/source/mod.rs b/src/commands/source/mod.rs index 6dba295d..ae4a47a7 100644 --- a/src/commands/source/mod.rs +++ b/src/commands/source/mod.rs @@ -74,21 +74,7 @@ pub async fn verify( .map(|s| crate::commands::util::mk_package_name_regex(s.as_ref())) .transpose()?; - let packages = repo - .packages() - .filter(|p| { - match (pname.as_ref(), pvers.as_ref(), matching_regexp.as_ref()) { - (None, None, None) => true, - (Some(pname), None, None) => p.name() == pname, - (Some(pname), Some(vers), None) => p.name() == pname && vers.matches(p.version()), - (None, None, Some(regex)) => regex.is_match(p.name()), - - (_, _, _) => { - panic!("This should not be possible, either we select packages by name and (optionally) version, or by regex.") - }, - } - }) - .inspect(|p| trace!("Found for verification: {} {}", p.name(), p.version())); + let packages = repo.search_packages(&pname, &pvers, &matching_regexp)?; verify_impl(packages, &sc, &progressbars).await } diff --git a/src/repository/repository.rs b/src/repository/repository.rs index eb3fc356..1f549504 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -17,6 +17,7 @@ use anyhow::anyhow; use anyhow::Context; use anyhow::Error; use anyhow::Result; +use regex::Regex; use resiter::AndThen; use resiter::FilterMap; use resiter::Map; @@ -270,6 +271,44 @@ impl Repository { pub fn packages(&self) -> impl Iterator { self.inner.values() } + + pub fn search_packages<'a>( + &'a self, + pname: &'a Option, + pvers: &'a Option, + matching_regexp: &'a Option, + ) -> Result + 'a> { + let mut r = self.inner.values() + .filter(move |p| { + match (pname, pvers, matching_regexp) { + (None, None, None) => true, + (Some(pname), None, None) => p.name() == pname, + (Some(pname), Some(vers), None) => p.name() == pname && vers.matches(p.version()), + (None, None, Some(regex)) => regex.is_match(p.name()), + + (_, _, _) => { + panic!("This should not be possible, either we select packages by name and (optionally) version, or by regex.") + }, + } + }).peekable(); + + // check if the iterator is empty + if r.peek().is_none() { + match (pname, pvers, matching_regexp) { + (Some(pname), None, None) => return Err(anyhow!("{} not found", pname)), + (Some(pname), Some(vers), None) => { + return Err(anyhow!("{} {} not found", pname, vers)) + } + (None, None, Some(regex)) => return Err(anyhow!("{} regex not found", regex)), + + (_, _, _) => { + panic!("This should not be possible, either we select packages by name and (optionally) version, or by regex.") + } + } + } + + Ok(r) + } } #[cfg(test)] From 61f4875db169d8d45aedfd653370a215b8771899 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Tue, 15 Oct 2024 08:39:19 +0200 Subject: [PATCH 103/150] Show the download progress in megabyte (MB) Provides a clearer understanding of the download's actual size. Fixes #421 Signed-off-by: Nico Steinle --- src/commands/source/download.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index 73244eac..3a84fca7 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -86,11 +86,15 @@ impl ProgressWrapper { async fn set_message(&self) { let bar = self.bar.lock().await; - bar.set_message(format!("Downloading ({current_bytes}/{sum_bytes} bytes, {dlfinished}/{dlsum} downloads finished)", - current_bytes = self.current_bytes, - sum_bytes = self.sum_bytes, - dlfinished = self.finished_downloads, - dlsum = self.download_count)); + let current_mbytes = (self.current_bytes as f64) / 1_000_000_f64; + let sum_mbytes = (self.sum_bytes as f64) / 1_000_000_f64; + bar.set_message(format!( + "Downloading ({:.2}/{:.2} MB, {dlfinished}/{dlsum} downloads finished)", + current_mbytes, + sum_mbytes, + dlfinished = self.finished_downloads, + dlsum = self.download_count + )); } async fn success(&self) { From 51ac9f61a3610aae860bbfd48530d72bb0b154fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:53:16 +0000 Subject: [PATCH 104/150] build(deps): bump which from 6.0.3 to 7.0.0 Bumps [which](https://github.com/harryfei/which-rs) from 6.0.3 to 7.0.0. - [Release notes](https://github.com/harryfei/which-rs/releases) - [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/harryfei/which-rs/compare/6.0.3...7.0.0) --- updated-dependencies: - dependency-name: which dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c32dcd58..4a899251 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3198,9 +3198,9 @@ dependencies = [ [[package]] name = "which" -version = "6.0.3" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" +checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b" dependencies = [ "either", "home", diff --git a/Cargo.toml b/Cargo.toml index 447df79c..285fb0ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,7 +79,7 @@ unindent = "0.2" url = { version = "2", features = ["serde"] } uuid = { version = "1", features = ["serde", "v4"] } walkdir = "2" -which = "6" +which = "7" xdg = "2" [build-dependencies] From db003281e9919adf3c08822776b65ed5547e6fe9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:53:48 +0000 Subject: [PATCH 105/150] build(deps): bump aquamarine from 0.5.0 to 0.6.0 Bumps [aquamarine](https://github.com/mersinvald/aquamarine) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/mersinvald/aquamarine/releases) - [Changelog](https://github.com/mersinvald/aquamarine/blob/master/CHANGELOG.md) - [Commits](https://github.com/mersinvald/aquamarine/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: aquamarine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 30 +++--------------------------- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c32dcd58..bb8ad3da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,13 +98,13 @@ checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "aquamarine" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +checksum = "0f50776554130342de4836ba542aa85a4ddb361690d7e8df13774d7284c3d5c2" dependencies = [ "include_dir", "itertools 0.10.5", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.79", @@ -1943,30 +1943,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro-error-attr2" version = "2.0.0" diff --git a/Cargo.toml b/Cargo.toml index 447df79c..3b331c20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ maintenance = { status = "passively-maintained" } [dependencies] anyhow = "1" -aquamarine = "0.5" +aquamarine = "0.6" ascii_table = { version = "4", features = ["color_codes", "wide_characters"] } bytesize = "1" chrono = "0.4" From 463111e030e8375abbf394c39fb3d9cc0d36e94b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 4 Nov 2024 20:38:07 +0100 Subject: [PATCH 106/150] Remove needless lifetimes to fix Clippy warnings The new needless_lifetimes lint [0], that got added in version 1.29.0, reported these lifetime annotations which can be removed by relying on lifetime elision. This fixes our optional CI Clippy check with the beta toolchain. [0]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes Signed-off-by: Michael Weiss --- src/db/connection.rs | 2 +- src/filestore/path.rs | 2 +- src/orchestrator/orchestrator.rs | 2 +- src/orchestrator/util.rs | 2 +- src/package/dag.rs | 2 +- src/package/package.rs | 2 +- src/ui/package.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/db/connection.rs b/src/db/connection.rs index 55032ce7..6efad445 100644 --- a/src/db/connection.rs +++ b/src/db/connection.rs @@ -40,7 +40,7 @@ pub struct DbConnectionConfig<'a> { database_connection_timeout: u16, } -impl<'a> std::fmt::Debug for DbConnectionConfig<'a> { +impl std::fmt::Debug for DbConnectionConfig<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { write!( f, diff --git a/src/filestore/path.rs b/src/filestore/path.rs index 9c3ff6ce..44c5d183 100644 --- a/src/filestore/path.rs +++ b/src/filestore/path.rs @@ -215,7 +215,7 @@ impl<'a> FullArtifactPath<'a> { #[derive(Debug)] pub struct FullArtifactPathDisplay<'a>(&'a StoreRoot, &'a ArtifactPath); -impl<'a> std::fmt::Display for FullArtifactPathDisplay<'a> { +impl std::fmt::Display for FullArtifactPathDisplay<'_> { fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(fmt, "{}/{}", self.0.display(), self.1.display()) } diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 46f66385..4e4690a9 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -557,7 +557,7 @@ struct JobTask<'a> { /// runtime stops running it because some other `JobTask` errored. /// /// In the latter case, we cleanup by telling the progressbar to finish. -impl<'a> Drop for JobTask<'a> { +impl Drop for JobTask<'_> { fn drop(&mut self) { if !self.bar.is_finished() { // If there are dependencies, the error is probably from another task diff --git a/src/orchestrator/util.rs b/src/orchestrator/util.rs index 7efc23c9..a30c7512 100644 --- a/src/orchestrator/util.rs +++ b/src/orchestrator/util.rs @@ -29,7 +29,7 @@ impl AsReceivedErrorDisplay for HashMap { pub struct ReceivedErrorDisplay<'a>(&'a HashMap); -impl<'a> std::fmt::Display for ReceivedErrorDisplay<'a> { +impl std::fmt::Display for ReceivedErrorDisplay<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0 .iter() diff --git a/src/package/dag.rs b/src/package/dag.rs index f58517ee..dea1ed94 100644 --- a/src/package/dag.rs +++ b/src/package/dag.rs @@ -263,7 +263,7 @@ impl Dag { #[derive(Clone)] pub struct DagDisplay<'a>(&'a Dag, daggy::NodeIndex, Option); -impl<'a> TreeItem for DagDisplay<'a> { +impl TreeItem for DagDisplay<'_> { type Child = Self; fn write_self(&self, f: &mut W, _: &Style) -> IoResult<()> { diff --git a/src/package/package.rs b/src/package/package.rs index 7e7b845d..6e8db5fa 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -138,7 +138,7 @@ impl std::fmt::Debug for Package { pub struct DebugPackage<'a>(&'a Package); #[cfg(debug_assertions)] -impl<'a> std::fmt::Debug for DebugPackage<'a> { +impl std::fmt::Debug for DebugPackage<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { writeln!( f, diff --git a/src/ui/package.rs b/src/ui/package.rs index 5d0fef57..be154ab3 100644 --- a/src/ui/package.rs +++ b/src/ui/package.rs @@ -108,7 +108,7 @@ pub fn handlebars_for_package_printing(format: &str) -> Result { Ok(hb) } -impl<'a, P: Borrow> PreparePrintPackage<'a, P> { +impl> PreparePrintPackage<'_, P> { pub fn into_displayable(self) -> Result { let script = ScriptBuilder::new(&Shebang::from(self.config.shebang().clone())) .build( From 2e3437bda61a7abfed13e541090aaa3c6a4a175f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 4 Nov 2024 19:42:25 +0100 Subject: [PATCH 107/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Because 19 new(/updated?) dependencies use the `Unicode-3.0` license, we have to add it to the list of allowed licenses in `deny.toml`. This should be fine given that we already allow the `Unicode-DFS-2016` license and both licences are OSI approved [0][1]. On the SPDX license list [0] both Unicode licenses aren't listed as "FSF free/libre" but this is likely only because those versions have never been checked by FSF. The FSF lists the "Unicode, Inc. License Agreement for Data Files and Software (#Unicode)" license under "Free licenses, compatible with the GNU GPL" [2] and comments that "It is a lax permissive license, compatible with all versions of the GPL." but the license link [3] redirects to the `Unicode-DFS-2012` version. [0]: https://spdx.org/licenses/ [1]: https://opensource.org/license/unicode-license-v3 [2]: https://www.gnu.org/licenses/license-list.html#Unicode [3]: https://directory.fsf.org/wiki/License:Unicode Signed-off-by: Michael Weiss --- Cargo.lock | 695 ++++++++++++++++++++++++++++++++++++----------------- deny.toml | 1 + 2 files changed, 472 insertions(+), 224 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c32dcd58..9faadee1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -58,43 +58,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" [[package]] name = "aquamarine" @@ -107,7 +107,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -129,7 +129,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -297,9 +297,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "bytesize" @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.24" +version = "1.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9" dependencies = [ "jobserver", "libc", @@ -373,18 +373,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.19" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.19" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -394,9 +394,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.32" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a01f4f9ee6c066d42a1c8dedf0dcddad16c72a8981a309d6398de3a75b0c39" +checksum = "11611dca53440593f38e6b25ec629de50b14cdfa63adc0fb856115a2c6d97595" dependencies = [ "clap", ] @@ -409,9 +409,9 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" @@ -571,7 +571,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -582,7 +582,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -634,7 +634,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -654,7 +654,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -667,6 +667,17 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dsl_auto_type" version = "0.1.2" @@ -678,7 +689,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -695,9 +706,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -790,9 +801,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -805,9 +816,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -815,15 +826,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -832,38 +843,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -919,14 +930,14 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "git2" @@ -956,7 +967,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", - "bytes 1.7.2", + "bytes 1.8.0", "fnv", "futures-core", "futures-sink", @@ -970,11 +981,12 @@ dependencies = [ [[package]] name = "handlebars" -version = "6.1.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25b617d1375ef96eeb920ae717e3da34a02fc979fe632c75128350f9e1f74a" +checksum = "fd4ccde012831f9a071a637b0d4e31df31c0f6c525784b35ae76a9ac6bc1e315" dependencies = [ "log", + "num-order", "pest", "pest_derive", "serde", @@ -984,9 +996,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "heck" @@ -1021,7 +1033,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "fnv", "itoa", ] @@ -1032,7 +1044,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "fnv", "itoa", ] @@ -1043,7 +1055,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "http 0.2.12", "pin-project-lite", ] @@ -1054,7 +1066,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "http 1.1.0", ] @@ -1064,7 +1076,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-util", "http 1.1.0", "http-body 1.0.1", @@ -1085,9 +1097,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "human-panic" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c5a08ed290eac04006e21e63d32e90086b6182c7cd0452d10f4264def1fec9a" +checksum = "80b84a66a325082740043a6c28bbea400c129eac0d3a27673a1de971e44bf1f7" dependencies = [ "anstream", "anstyle", @@ -1107,11 +1119,11 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-channel", "futures-core", "futures-util", @@ -1130,11 +1142,11 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-channel", "futures-util", "h2", @@ -1155,7 +1167,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" dependencies = [ "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "linked_hash_set", "once_cell", "openssl", @@ -1174,7 +1186,7 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "rustls", "rustls-pki-types", @@ -1189,9 +1201,9 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "native-tls", "tokio", @@ -1201,16 +1213,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2", "tokio", @@ -1226,8 +1238,8 @@ checksum = "0fafdf7b2b2de7c9784f76e02c0935e65a8117ec3b768644379983ab333ac98c" dependencies = [ "futures-util", "hex", - "hyper 0.14.30", - "pin-project 1.1.5", + "hyper 0.14.31", + "pin-project 1.1.7", "tokio", ] @@ -1254,6 +1266,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1262,12 +1392,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1329,9 +1470,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" @@ -1374,9 +1515,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1389,9 +1530,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libgit2-sys" @@ -1465,6 +1606,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1593,6 +1740,21 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-modular" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bb261bf36fa7d83f4c294f834e91256769097b3cb505d44831e0a179ac647f" + +[[package]] +name = "num-order" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537b596b97c40fcf8056d153049eb22f481c17ebce72a513ec9286e4986d1bb6" +dependencies = [ + "num-modular", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1619,21 +1781,18 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "onig" @@ -1659,9 +1818,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -1680,7 +1839,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1691,9 +1850,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1763,14 +1922,14 @@ dependencies = [ "regex", "regex-syntax 0.8.5", "structmeta", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" [[package]] name = "percent-encoding" @@ -1780,9 +1939,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -1791,9 +1950,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -1801,22 +1960,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "pest_meta" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -1844,11 +2003,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ - "pin-project-internal 1.1.5", + "pin-project-internal 1.1.7", ] [[package]] @@ -1864,20 +2023,20 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1986,14 +2145,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -2097,9 +2256,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2141,12 +2300,12 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", - "bytes 1.7.2", + "bytes 1.8.0", "encoding_rs", "futures-core", "futures-util", @@ -2154,7 +2313,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-rustls", "hyper-tls", "hyper-util", @@ -2222,9 +2381,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags 2.6.0", "errno", @@ -2235,9 +2394,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "once_cell", "rustls-pki-types", @@ -2257,9 +2416,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2274,9 +2433,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2295,9 +2454,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -2351,29 +2510,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -2447,18 +2606,18 @@ checksum = "1e468265908f45299c26571dad9a2e5cb3656eceb51cd58f1441cf61aa71aad6" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.7.2", + "bytes 1.8.0", "chrono", "flate2", "futures-util", "futures_codec", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-openssl", "hyperlocal", "log", "mime", "openssl", - "pin-project 1.1.5", + "pin-project 1.1.7", "serde", "serde_json", "tar", @@ -2512,6 +2671,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -2527,7 +2692,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2538,7 +2703,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2560,9 +2725,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -2578,6 +2743,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "syntect" version = "5.2.0" @@ -2623,9 +2799,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -2657,22 +2833,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2719,28 +2895,23 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", - "bytes 1.7.2", + "bytes 1.8.0", "libc", "mio", "pin-project-lite", @@ -2758,7 +2929,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2810,7 +2981,7 @@ version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-core", "futures-sink", "pin-project-lite", @@ -2891,7 +3062,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2967,7 +3138,7 @@ checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2982,27 +3153,12 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-width" version = "0.1.14" @@ -3023,9 +3179,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -3033,6 +3189,18 @@ dependencies = [ "serde", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -3041,9 +3209,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", @@ -3108,9 +3276,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -3119,24 +3287,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3146,9 +3314,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3156,28 +3324,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -3188,9 +3356,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3441,6 +3609,18 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xattr" version = "1.3.1" @@ -3467,6 +3647,30 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -3485,7 +3689,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -3493,3 +3718,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/deny.toml b/deny.toml index 61c71531..56d250b0 100644 --- a/deny.toml +++ b/deny.toml @@ -14,6 +14,7 @@ allow = [ "EPL-2.0", "MIT", "MPL-2.0", + "Unicode-3.0", "Unicode-DFS-2016" ] From ce9fd556828ed166f8587b9c6ebe8577931a12b7 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 4 Nov 2024 21:57:26 +0100 Subject: [PATCH 108/150] deny.toml: Drop an exception for the unmaintained proc-macro-error crate I added this exception in 97bd303 to make CI happy/green but we can now remove it again since the last update of the `aquamarine` crate in db00328 (#434). The `aquamarine` crate switched to `proc-macro-error2` as well. Signed-off-by: Michael Weiss --- deny.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/deny.toml b/deny.toml index 56d250b0..1e64fb8f 100644 --- a/deny.toml +++ b/deny.toml @@ -65,9 +65,4 @@ ignore = [ # https://github.com/trishume/syntect/issues/537 is resolved (replace # yaml-rust with yaml-rust2): { id = "RUSTSEC-2024-0320", reason = "Only an informative advisory that the crate is unmaintained and the maintainer unreachable" }, - # Ignore an "INFO Unmaintained" advisory for the proc-macro-error crate - # that the "aquamarine" crate uses. This can be removed once - # https://github.com/mersinvald/aquamarine/issues/45 is resolved (Move away - # from proc-macro-error): - { id = "RUSTSEC-2024-0370", reason = "Only an informative advisory that the crate is unmaintained and the maintainer unreachable" }, ] From 16e1cc9a9daa703415f3c3e5585b13969c6c3c95 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Mon, 9 Sep 2024 10:15:45 +0200 Subject: [PATCH 109/150] Add `serial-buildorder` argument for the tree-of subcommand - Introduced a new command-line argument `--serial-buildorder` that outputs the flattened package DAG in a serial build order. - The `--serial-buildorder` argument conflicts with the existing `--dot` argument for now. Showing the serial build order in the dot format would not bring any benefits. - Ensured cyclic dependency detection and error handling during topological sorting. Fixes #379 Signed-off-by: Nico Steinle --- src/cli.rs | 18 ++++++++++++++++++ src/commands/tree_of.rs | 15 +++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index dde71420..3f3af5c5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1024,6 +1024,24 @@ pub fn cli() -> Command { .required(false) .long("dot") .help("Output the dependency DAG in the Graphviz DOT format") + .conflicts_with("serial-buildorder") + ) + .arg(Arg::new("serial-buildorder") + .action(ArgAction::SetTrue) + .required(false) + .long("serial-buildorder") + .help("Output the dependencies in a serial build order (flattened tree)") + .long_help(indoc::indoc!(r#" + A serial build order ensures that dependencies are built one at a time + in a specific sequence. This approach follows a reversed topological ordering, + where dependencies (or children) are listed and built first. Each dependency + must be fully built before the next one begins, ensuring all components are + available when needed. + + Keep in mind that the actual build order remains parallel, this serialized + output is mainly useful for debugging purposes. + "#)) + .conflicts_with("dot") ) ) diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index 95d7604b..0ca2648e 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -60,6 +60,8 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat let dot = matches.get_flag("dot"); + let serial_buildorder = matches.get_flag("serial-buildorder"); + repo.packages() .filter(|p| pname.as_ref().map(|n| p.name() == n).unwrap_or(true)) .filter(|p| { @@ -92,6 +94,19 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat ); println!("{:?}", dot); + Ok(()) + } else if serial_buildorder { + let petgraph: DiGraph = (*dag.dag()).clone().into(); + + let topo_sorted = petgraph::algo::toposort(&petgraph, None) + .map_err(|_| Error::msg("Cyclic dependency found!"))?; + + for node in topo_sorted.iter().rev() { + let package = petgraph.node_weight(*node).unwrap(); + println!("{}", package.display_name_version()); + } + println!(); + Ok(()) } else { let stdout = std::io::stdout(); From 697cbdb1d9f45d49b9ccdceedd45917d91421cda Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Mon, 11 Nov 2024 11:40:33 +0100 Subject: [PATCH 110/150] Let cargo-deny ignore that the instant crate is unmaintained This isn't a security issue yet, the `indicatif` crate should get rid of it eventually, and this isn't really actionable for us so let's ignore that informative advisory so that CI remains green (it's an optional CI check but the failure could mask real vulnerabilities and does also mark the CI run with a red cross on the GitHub UI). Thank you for the nice copypasta commit message from the last deny unmaintained advisory. Signed-off-by: Nico Steinle --- deny.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deny.toml b/deny.toml index 1e64fb8f..309d1536 100644 --- a/deny.toml +++ b/deny.toml @@ -65,4 +65,11 @@ ignore = [ # https://github.com/trishume/syntect/issues/537 is resolved (replace # yaml-rust with yaml-rust2): { id = "RUSTSEC-2024-0320", reason = "Only an informative advisory that the crate is unmaintained and the maintainer unreachable" }, + + # Ignore an "INFO Unmaintained" advisory for the instant crate + # that the "indicatif" crate uses. This can be removed once + # https://github.com/console-rs/indicatif/issues/665 is resolved + # (The dependency instant is no longer maintained - + # consider switching to web-time instead): + { id = "RUSTSEC-2024-0384", reason = "Only an informative advisory that the crate is unmaintained and the author recommends using the maintained web-time crate instead." }, ] From 1e76d478cc8c0a4cc2cb7ffd7461146e96ed6239 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Mon, 11 Nov 2024 13:24:13 +0100 Subject: [PATCH 111/150] Add a lifetime to the return type in search_packages The rust beta version fails to compile without those. Signed-off-by: Nico Steinle --- src/repository/repository.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository/repository.rs b/src/repository/repository.rs index 1f549504..f6db4d52 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -277,7 +277,7 @@ impl Repository { pname: &'a Option, pvers: &'a Option, matching_regexp: &'a Option, - ) -> Result + 'a> { + ) -> Result + 'a> { let mut r = self.inner.values() .filter(move |p| { match (pname, pvers, matching_regexp) { From cc096f6f17fb02f67eb0821f643d1e0c880c1915 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:02:09 +0000 Subject: [PATCH 112/150] build(deps): bump rustls from 0.23.16 to 0.23.18 Bumps [rustls](https://github.com/rustls/rustls) from 0.23.16 to 0.23.18. - [Release notes](https://github.com/rustls/rustls/releases) - [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md) - [Commits](https://github.com/rustls/rustls/compare/v/0.23.16...v/0.23.18) --- updated-dependencies: - dependency-name: rustls dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90b0e423..969fe017 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2370,9 +2370,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ "once_cell", "rustls-pki-types", From 362e4a40b22731a67aacfacc46cc67782ae50412 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 2 Dec 2024 22:00:17 +0100 Subject: [PATCH 113/150] Remove needless lifetimes to fix Clippy warnings I already removed some needless lifetimes in 463111e but the needless_lifetimes lint [0] got improved again in Clippy version 0.1.84 (0f13036040 2024-11-30) so this commit drops additional lifetime annotations which can be removed by relying on lifetime elision. This fixes our optional CI Clippy check with the beta toolchain. [0]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes Signed-off-by: Michael Weiss --- src/endpoint/configured.rs | 21 ++++++--------------- src/endpoint/scheduler.rs | 2 +- src/orchestrator/orchestrator.rs | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index 71330f27..1d91e904 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -543,10 +543,7 @@ impl<'a> PreparedContainer<'a> { Ok(create_info) } - async fn copy_source_to_container<'ca>( - container: &Container<'ca>, - job: &RunnableJob, - ) -> Result<()> { + async fn copy_source_to_container(container: &Container<'_>, job: &RunnableJob) -> Result<()> { use tokio::io::AsyncReadExt; job.package_sources() @@ -614,10 +611,7 @@ impl<'a> PreparedContainer<'a> { .map_err(Error::from) } - async fn copy_patches_to_container<'ca>( - container: &Container<'ca>, - job: &RunnableJob, - ) -> Result<()> { + async fn copy_patches_to_container(container: &Container<'_>, job: &RunnableJob) -> Result<()> { use tokio::io::AsyncReadExt; debug!( @@ -672,8 +666,8 @@ impl<'a> PreparedContainer<'a> { .map_err(Error::from) } - async fn copy_artifacts_to_container<'ca>( - container: &Container<'ca>, + async fn copy_artifacts_to_container( + container: &Container<'_>, job: &RunnableJob, staging_store: Arc>, release_stores: &[Arc], @@ -777,10 +771,7 @@ impl<'a> PreparedContainer<'a> { .map(|_| ()) } - async fn copy_script_to_container<'ca>( - container: &Container<'ca>, - script: &Script, - ) -> Result<()> { + async fn copy_script_to_container(container: &Container<'_>, script: &Script) -> Result<()> { let script_path = PathBuf::from(crate::consts::SCRIPT_PATH); container .copy_file_into(script_path, script.as_ref().as_bytes()) @@ -932,7 +923,7 @@ pub struct ExecutedContainer<'a> { exit_info: Option<(bool, Option)>, } -impl<'a> ExecutedContainer<'a> { +impl ExecutedContainer<'_> { pub fn container_hash(&self) -> ContainerHash { ContainerHash::from(self.create_info.id.clone()) } diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs index 570eb410..74caaac4 100644 --- a/src/endpoint/scheduler.rs +++ b/src/endpoint/scheduler.rs @@ -382,7 +382,7 @@ struct LogReceiver<'a> { bar: ProgressBar, } -impl<'a> LogReceiver<'a> { +impl LogReceiver<'_> { async fn join(mut self) -> Result { let mut success = None; // Reserve a reasonable amount of elements. diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 4e4690a9..b4e0f1dc 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -263,7 +263,7 @@ impl Borrow for ProducedArtifact { } } -impl<'a> Orchestrator<'a> { +impl Orchestrator<'_> { pub async fn run(self, output: &mut Vec) -> Result> { let (results, errors) = self.run_tree().await?; output.extend(results); From 5a64ec8c2c59bc90dd855684a63221bf1ab454ad Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 2 Dec 2024 22:16:54 +0100 Subject: [PATCH 114/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 400 +++++++++++++++++++++++++++-------------------------- 1 file changed, 201 insertions(+), 199 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 969fe017..b9abe7c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "aquamarine" @@ -107,18 +107,18 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] name = "ascii_table" -version = "4.0.4" +version = "4.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed8a80a95ab122e7cc43bfde1d51949c89ff67e0c76eb795dc045003418473e2" +checksum = "adb7e515f68a8667f957e85c7d59639fe1fa2e0b06c3c2394869b73a404e52ed" dependencies = [ "lazy_static", "regex", - "unicode-width", + "unicode-width 0.2.0", ] [[package]] @@ -129,7 +129,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -203,12 +203,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "serde", ] @@ -297,9 +297,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "bytesize" @@ -318,9 +318,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.34" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "jobserver", "libc", @@ -373,18 +373,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -394,18 +394,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11611dca53440593f38e6b25ec629de50b14cdfa63adc0fb856115a2c6d97595" +checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" dependencies = [ "clap", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "colorchoice" @@ -446,7 +446,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", + "unicode-width 0.1.14", "windows-sys 0.52.0", ] @@ -468,9 +468,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -521,9 +521,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -571,7 +571,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -582,7 +582,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -609,9 +609,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.4" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158fe8e2e68695bd615d7e4f3227c0727b151330d3e253b525086c348d055d5e" +checksum = "cbf9649c05e0a9dbd6d0b0b8301db5182b972d0fd02f0a7c6736cf632d7c0fd5" dependencies = [ "bitflags 2.6.0", "byteorder", @@ -634,7 +634,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -654,7 +654,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -675,7 +675,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -689,7 +689,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -721,19 +721,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "filetime" @@ -761,9 +761,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -855,7 +855,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -930,7 +930,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -962,12 +962,12 @@ checksum = "9525474359e360de19580a77590f3491c94d57b1ef2b8bd468877a83cbc7f4cb" [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", - "bytes 1.8.0", + "bytes 1.9.0", "fnv", "futures-core", "futures-sink", @@ -996,9 +996,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -1006,12 +1006,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hex" version = "0.4.3" @@ -1033,7 +1027,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "fnv", "itoa", ] @@ -1044,7 +1038,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "fnv", "itoa", ] @@ -1055,7 +1049,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "http 0.2.12", "pin-project-lite", ] @@ -1066,7 +1060,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "http 1.1.0", ] @@ -1076,7 +1070,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "futures-util", "http 1.1.0", "http-body 1.0.1", @@ -1123,7 +1117,7 @@ version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "futures-channel", "futures-core", "futures-util", @@ -1142,11 +1136,11 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "futures-channel", "futures-util", "h2", @@ -1186,7 +1180,7 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "rustls", "rustls-pki-types", @@ -1201,9 +1195,9 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "http-body-util", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "native-tls", "tokio", @@ -1217,12 +1211,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.5.0", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", @@ -1381,7 +1375,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -1432,9 +1426,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown", @@ -1442,15 +1436,15 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.2.0", + "web-time", ] [[package]] @@ -1459,15 +1453,6 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "ipnet" version = "2.10.1" @@ -1500,9 +1485,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -1515,10 +1500,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1530,9 +1516,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libgit2-sys" @@ -1608,9 +1594,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "litemap" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -1687,11 +1673,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", "wasi", "windows-sys 0.52.0", @@ -1839,7 +1824,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -1862,9 +1847,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.8.2" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +checksum = "e5ca711d8b83edbb00b44d504503cd247c9c0bd8b0fa2694f2a1a3d8165379ce" dependencies = [ "log", "serde", @@ -1922,14 +1907,14 @@ dependencies = [ "regex", "regex-syntax 0.8.5", "structmeta", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] name = "pathdiff" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "percent-encoding" @@ -1968,7 +1953,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2029,7 +2014,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2074,9 +2059,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "powerfmt" @@ -2121,23 +2106,23 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "ptree" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709c3b241d6a6ccc1933b1c6d7d997fae2b3dff8981f6780eac67df03c32f3ef" +checksum = "289cfd20ebec0e7ff2572e370dd7a1c9973ba666d3c38c5e747de0a4ada21f17" dependencies = [ "serde", ] @@ -2238,7 +2223,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -2253,9 +2238,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2281,7 +2266,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", - "bytes 1.8.0", + "bytes 1.9.0", "encoding_rs", "futures-core", "futures-util", @@ -2289,7 +2274,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-rustls", "hyper-tls", "hyper-util", @@ -2357,9 +2342,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.38" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -2370,9 +2355,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "rustls-pki-types", @@ -2430,9 +2415,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -2467,9 +2452,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -2486,29 +2471,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -2582,7 +2567,7 @@ checksum = "1e468265908f45299c26571dad9a2e5cb3656eceb51cd58f1441cf61aa71aad6" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.8.0", + "bytes 1.9.0", "chrono", "flate2", "futures-util", @@ -2633,9 +2618,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2668,7 +2653,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2679,7 +2664,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2701,9 +2686,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2712,9 +2697,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -2727,7 +2712,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2786,9 +2771,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -2799,9 +2784,9 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" dependencies = [ "rustix", "windows-sys 0.59.0", @@ -2809,22 +2794,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2882,12 +2867,12 @@ dependencies = [ [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", - "bytes 1.8.0", + "bytes 1.9.0", "libc", "mio", "pin-project-lite", @@ -2905,7 +2890,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -2957,7 +2942,7 @@ version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ - "bytes 1.8.0", + "bytes 1.9.0", "futures-core", "futures-sink", "pin-project-lite", @@ -3021,9 +3006,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -3032,13 +3017,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3054,9 +3039,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -3075,9 +3060,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -3114,7 +3099,7 @@ checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] @@ -3131,9 +3116,9 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-width" @@ -3141,6 +3126,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unindent" version = "0.2.3" @@ -3155,9 +3146,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.3" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3252,9 +3243,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -3263,36 +3254,37 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3300,22 +3292,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "wasm-streams" @@ -3332,9 +3324,19 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -3625,9 +3627,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", @@ -3637,13 +3639,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "synstructure", ] @@ -3665,27 +3667,27 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] [[package]] name = "zerofrom" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", "synstructure", ] @@ -3714,5 +3716,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.90", ] From 5f2e163d2d6ea4feeeb02447aa1acf3d1b569d79 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 30 Dec 2024 17:59:14 +0100 Subject: [PATCH 115/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 513 ++++++++++++++++++++++++----------------------------- 1 file changed, 236 insertions(+), 277 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b9abe7c9..05a3cd4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "aquamarine" @@ -107,7 +107,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -118,7 +118,7 @@ checksum = "adb7e515f68a8667f957e85c7d59639fe1fa2e0b06c3c2394869b73a404e52ed" dependencies = [ "lazy_static", "regex", - "unicode-width 0.2.0", + "unicode-width", ] [[package]] @@ -129,7 +129,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -156,7 +156,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -203,9 +203,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" +checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8" dependencies = [ "memchr", "regex-automata 0.4.9", @@ -336,14 +336,14 @@ dependencies = [ "semver", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "cc" -version = "1.2.2" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" dependencies = [ "jobserver", "libc", @@ -358,9 +358,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -368,23 +368,23 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] name = "clap" -version = "4.5.21" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.21" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -394,18 +394,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.38" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" +checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9" dependencies = [ "clap", ] [[package]] name = "clap_lex" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" @@ -415,12 +415,12 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -439,15 +439,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "unicode-width 0.1.14", - "windows-sys 0.52.0", + "once_cell", + "unicode-width", + "windows-sys 0.59.0", ] [[package]] @@ -486,9 +486,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -505,9 +505,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -571,7 +571,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -582,7 +582,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -603,15 +603,15 @@ dependencies = [ "console", "shell-words", "tempfile", - "thiserror", + "thiserror 1.0.69", "zeroize", ] [[package]] name = "diesel" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf9649c05e0a9dbd6d0b0b8301db5182b972d0fd02f0a7c6736cf632d7c0fd5" +checksum = "ccf1bedf64cdb9643204a36dd15b19a6ce8e7aa7f7b105868e9f1fad5ffa7d12" dependencies = [ "bitflags 2.6.0", "byteorder", @@ -634,7 +634,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -654,7 +654,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -675,7 +675,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -689,7 +689,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -700,9 +700,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -713,6 +713,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "env_home" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" + [[package]] name = "equivalent" version = "1.0.1" @@ -731,9 +737,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" @@ -755,9 +761,9 @@ checksum = "0ea2a3582a3bb84139554126bc608bf3e2a1ced8354dbdef38c41140ca10b3e3" [[package]] name = "fixedbitset" -version = "0.4.2" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" @@ -855,7 +861,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -930,7 +936,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -971,7 +977,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.1.0", + "http 1.2.0", "indexmap", "slab", "tokio", @@ -991,14 +997,14 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -1012,15 +1018,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "0.2.12" @@ -1034,9 +1031,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes 1.9.0", "fnv", @@ -1061,7 +1058,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes 1.9.0", - "http 1.1.0", + "http 1.2.0", ] [[package]] @@ -1072,7 +1069,7 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes 1.9.0", "futures-util", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", "pin-project-lite", ] @@ -1113,9 +1110,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.31" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes 1.9.0", "futures-channel", @@ -1136,15 +1133,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes 1.9.0", "futures-channel", "futures-util", "h2", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", "httparse", "itoa", @@ -1161,7 +1158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" dependencies = [ "http 0.2.12", - "hyper 0.14.31", + "hyper 0.14.32", "linked_hash_set", "once_cell", "openssl", @@ -1174,13 +1171,13 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.1.0", - "hyper 1.5.1", + "http 1.2.0", + "hyper 1.5.2", "hyper-util", "rustls", "rustls-pki-types", @@ -1197,7 +1194,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes 1.9.0", "http-body-util", - "hyper 1.5.1", + "hyper 1.5.2", "hyper-util", "native-tls", "tokio", @@ -1214,9 +1211,9 @@ dependencies = [ "bytes 1.9.0", "futures-channel", "futures-util", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", - "hyper 1.5.1", + "hyper 1.5.2", "pin-project-lite", "socket2", "tokio", @@ -1232,7 +1229,7 @@ checksum = "0fafdf7b2b2de7c9784f76e02c0935e65a8117ec3b768644379983ab333ac98c" dependencies = [ "futures-util", "hex", - "hyper 0.14.31", + "hyper 0.14.32", "pin-project 1.1.7", "tokio", ] @@ -1375,7 +1372,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -1426,9 +1423,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -1443,7 +1440,7 @@ dependencies = [ "console", "number_prefix", "portable-atomic", - "unicode-width 0.2.0", + "unicode-width", "web-time", ] @@ -1500,9 +1497,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ "once_cell", "wasm-bindgen", @@ -1516,9 +1513,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.167" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libgit2-sys" @@ -1579,9 +1576,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linked_hash_set" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" +checksum = "bae85b5be22d9843c80e5fc80e9b64c8a3b1f98f867c709956eca3efff4e92e2" dependencies = [ "linked-hash-map", ] @@ -1664,9 +1661,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] @@ -1766,9 +1763,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -1824,7 +1821,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -1847,9 +1844,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.9.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ca711d8b83edbb00b44d504503cd247c9c0bd8b0fa2694f2a1a3d8165379ce" +checksum = "eb6651f4be5e39563c4fe5cc8326349eb99a25d805a3493f791d5bfd0269e430" dependencies = [ "log", "serde", @@ -1882,7 +1879,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1907,7 +1904,7 @@ dependencies = [ "regex", "regex-syntax 0.8.5", "structmeta", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -1924,20 +1921,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.9", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ "pest", "pest_generator", @@ -1945,22 +1942,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] name = "pest_meta" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", @@ -1969,9 +1966,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "c94eb96835f05ec51384814c9b2daef83f68486f67a0e2e9680e0f698dca808e" dependencies = [ "fixedbitset", "indexmap", @@ -2014,7 +2011,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2106,7 +2103,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2138,9 +2135,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -2208,9 +2205,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -2261,9 +2258,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "7fe060fe50f524be480214aba758c71f99f90ee8c83c5a36b5e9e1d568eb4eb3" dependencies = [ "base64 0.22.1", "bytes 1.9.0", @@ -2271,10 +2268,10 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.1", + "hyper 1.5.2", "hyper-rustls", "hyper-tls", "hyper-util", @@ -2295,6 +2292,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-util", + "tower", "tower-service", "url", "wasm-bindgen", @@ -2342,22 +2340,22 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "once_cell", "rustls-pki-types", @@ -2377,9 +2375,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -2394,9 +2392,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" @@ -2452,9 +2450,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" dependencies = [ "core-foundation-sys", "libc", @@ -2462,38 +2460,38 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ "itoa", "memchr", @@ -2572,7 +2570,7 @@ dependencies = [ "flate2", "futures-util", "futures_codec", - "hyper 0.14.31", + "hyper 0.14.32", "hyper-openssl", "hyperlocal", "log", @@ -2653,7 +2651,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2664,7 +2662,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2686,9 +2684,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" dependencies = [ "proc-macro2", "quote", @@ -2712,7 +2710,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2732,7 +2730,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "thiserror", + "thiserror 1.0.69", "walkdir", "yaml-rust", ] @@ -2798,7 +2796,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +dependencies = [ + "thiserror-impl 2.0.9", ] [[package]] @@ -2809,7 +2816,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.93", ] [[package]] @@ -2824,9 +2842,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -2847,9 +2865,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -2867,9 +2885,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.41.1" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes 1.9.0", @@ -2890,7 +2908,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2916,20 +2934,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -2938,9 +2955,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes 1.9.0", "futures-core", @@ -2992,6 +3009,21 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -3023,7 +3055,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -3099,7 +3131,7 @@ checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -3120,12 +3152,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.0" @@ -3243,9 +3269,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -3254,24 +3280,23 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", @@ -3282,9 +3307,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3292,22 +3317,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-streams" @@ -3324,9 +3349,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -3344,12 +3369,12 @@ dependencies = [ [[package]] name = "which" -version = "7.0.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b" +checksum = "fb4a9e33648339dc1642b0e36e21b3385e6148e289226f657c809dee59df5028" dependencies = [ "either", - "home", + "env_home", "rustix", "winsafe", ] @@ -3391,7 +3416,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3402,7 +3427,7 @@ checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3411,7 +3436,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3421,16 +3446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -3439,7 +3455,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3448,22 +3464,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -3472,46 +3473,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3524,48 +3507,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -3645,7 +3604,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "synstructure", ] @@ -3667,7 +3626,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -3687,7 +3646,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "synstructure", ] @@ -3716,5 +3675,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] From 9f05d6aef60447d7994f9395329d41a30c3017f9 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 30 Dec 2024 18:31:17 +0100 Subject: [PATCH 116/150] Update the `config` crate from 0.13.4 to 0.15.4 We had to revert the update to version 0.14 in 4c6f027 due to a breaking change that made the `config` crate case-insensitive regarding configuration keys/settings. The impact of that upstream change/"regression" was tracked in [0], the change finally got reverted in [1], and version 0.15.0 was released with the original (case-sensitive) behaviour. [0]: https://github.com/mehcode/config-rs/issues/531 [1]: https://github.com/rust-cli/config-rs/pull/613 Signed-off-by: Michael Weiss --- Cargo.lock | 52 +++++++--------------------------------------------- Cargo.toml | 2 +- 2 files changed, 8 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05a3cd4e..3e807725 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,17 +121,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.93", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -269,7 +258,7 @@ dependencies = [ "terminal_size", "tokio", "tokio-stream", - "toml 0.8.19", + "toml", "tracing", "tracing-chrome", "tracing-subscriber", @@ -425,16 +414,14 @@ dependencies = [ [[package]] name = "config" -version = "0.13.4" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +checksum = "3d84f8d224ac58107d53d3ec2b9ad39fd8c8c4e285d3c9cb35485ffd2ca88cb3" dependencies = [ - "async-trait", - "lazy_static", - "nom", "pathdiff", "serde", - "toml 0.5.11", + "toml", + "winnow", ] [[package]] @@ -1098,7 +1085,7 @@ dependencies = [ "os_info", "serde", "serde_derive", - "toml 0.8.19", + "toml", "uuid", ] @@ -1633,7 +1620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", - "toml 0.8.19", + "toml", ] [[package]] @@ -1653,12 +1640,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.2" @@ -1696,16 +1677,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2966,15 +2937,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.8.19" diff --git a/Cargo.toml b/Cargo.toml index 89b9a76f..26544be8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ chrono = "0.4" clap = { version = "4", features = ["cargo"] } clap_complete = "4" colored = "2" -config = { version = "0.13", default-features = false, features = [ "toml" ] } +config = { version = "0.15", default-features = false, features = [ "toml" ] } csv = "1" daggy = { version = "0.8", features = [ "serde" ] } dialoguer = "0.11" From 6c0de6758eda5b0ce023284b97fc50d193ecf02a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 13:04:27 +0000 Subject: [PATCH 117/150] build(deps): bump itertools from 0.13.0 to 0.14.0 Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.13.0 to 0.14.0. - [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-itertools/itertools/compare/v0.13.0...v0.14.0) --- updated-dependencies: - dependency-name: itertools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e807725..206886c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -235,7 +235,7 @@ dependencies = [ "humantime", "indicatif", "indoc", - "itertools 0.13.0", + "itertools 0.14.0", "lazy_static", "parse-display", "petgraph", @@ -1460,9 +1460,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] diff --git a/Cargo.toml b/Cargo.toml index 26544be8..6b862373 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ human-panic = "2" humantime = "2" indicatif = "0.17" indoc = "2" -itertools = "0.13" +itertools = "0.14" lazy_static = "1" parse-display = "0.10" petgraph = "0.6" From aafeee9a28c2a4872c0e4b2985d81e92511cdcd0 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 22 Feb 2024 18:28:39 +0100 Subject: [PATCH 118/150] Reland: Cleanup the logic for "merging" package "patches" This is a reland of c88bad4 which I had to revert in 01f2ff7 since we had to downgrade the `config` crate (4c6f027). The reland is possible since we could upgrade the `config` crate to version 0.15 (9f05d6a) in the meantime. I cherry-picked c88bad4 but had to manually merge in the changes from 55920b5 and 97f0cee as well. See below for the original commit message: The old logic was pretty complex and only necessary to build the correct relative paths to the patch files (the paths in `pkg.toml` must be prepended with the relative path to the directory containing the `pkg.toml` file). Since the recently released version 0.14.0 of the `config` crate we can access the "origin" of a configuration value (`Value::origin()`) so we can use that information to avoid having to check if the `patches` have changed every time we merge another `pkg.toml` file. Unfortunately this does currently require a dedicated source implementation (`PkgTomlSource` but actually why not) since `config::File::from_str()` always sets the URI/origin to `None` and the new `set_patches_base_dir()` function is a bit of a hack... IMO the new code is much more readable, more efficient, and overall still cleaner though (most of the new code is for error handling and the custom `Source` implementation). [0]: https://github.com/mehcode/config-rs/blob/0.14.0/CHANGELOG.md#0140---2024-02-01 Signed-off-by: Michael Weiss (cherry picked from commit c88bad4fb30e2146691329ada0e4621d05b26512) --- src/package/package.rs | 42 ++++++++ src/repository/mod.rs | 1 + src/repository/pkg_toml_source.rs | 48 +++++++++ src/repository/repository.rs | 169 +++++++++++------------------- 4 files changed, 152 insertions(+), 108 deletions(-) create mode 100644 src/repository/pkg_toml_source.rs diff --git a/src/package/package.rs b/src/package/package.rs index 6e8db5fa..74d39411 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -9,8 +9,12 @@ // use std::collections::HashMap; +use std::path::Path; use std::path::PathBuf; +use anyhow::anyhow; +use anyhow::Context; +use anyhow::Result; use getset::Getters; use serde::Deserialize; use serde::Serialize; @@ -20,6 +24,7 @@ use crate::package::name::*; use crate::package::source::*; use crate::package::version::*; use crate::package::{Phase, PhaseName}; +use crate::repository::normalize_relative_path; use crate::util::docker::ImageName; use crate::util::EnvironmentVariableName; @@ -104,6 +109,43 @@ impl Package { format!("{} {}", self.name, self.version) } + // A function to prepend the path of the origin/base directory (where the `pkg.toml` file that + // defined the "patches" resides in) to the relative paths of the patches (it usually only + // makes sense to call this function once!): + pub fn set_patches_base_dir(&mut self, origin_dir: &Path, root_dir: &Path) -> Result<()> { + // origin_dir: The path to the directory of the pkg.toml file where the patches are declared + // root_dir: The root directory of the packages repository + for patch in self.patches.iter_mut() { + // Prepend the path of the directory of the `pkg.toml` file to the relative path of the + // patch file: + let mut path = origin_dir.join(patch.as_path()); + // Ensure that we use relative paths for the patches (the rest of the code that uses + // the patches doesn't work correctly with absolute paths): + if path.is_absolute() { + path = path + .strip_prefix(root_dir) + .map(|p| p.to_owned()) + .with_context(|| { + anyhow!( + "Cannot strip the prefix {} (root directory) form path {} (origin directory)", + root_dir.display(), + origin_dir.display() + ) + })?; + } + if path.is_absolute() { + // The stripping of root_dir in the previous if branch didn't work: + return Err(anyhow!( + "Bug: The path {} is absolute but it should be a relative path.", + path.display() + )); + } else { + *patch = normalize_relative_path(path)?; + } + } + Ok(()) + } + #[cfg(test)] pub fn set_dependencies(&mut self, dependencies: Dependencies) { self.dependencies = dependencies; diff --git a/src/repository/mod.rs b/src/repository/mod.rs index 5167a781..c7d9faeb 100644 --- a/src/repository/mod.rs +++ b/src/repository/mod.rs @@ -13,3 +13,4 @@ mod repository; pub use repository::*; mod fs; +mod pkg_toml_source; diff --git a/src/repository/pkg_toml_source.rs b/src/repository/pkg_toml_source.rs new file mode 100644 index 00000000..9f765dad --- /dev/null +++ b/src/repository/pkg_toml_source.rs @@ -0,0 +1,48 @@ +// Copyright (c) 2020-2024 science+computing ag and other contributors +// +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ +// +// SPDX-License-Identifier: EPL-2.0 + +// A custom `Source` implementation for the `config` crate to tack the `pkg.toml` file path as URI/origin +// in addition to the content (basically a replacement for `config::File::from_str(str, format)`). + +use std::path::Path; + +use config::ConfigError; +use config::FileFormat; +use config::Format; +use config::Map; +use config::Source; +use config::Value; + +#[derive(Clone, Debug)] +pub struct PkgTomlSource { + content: String, + uri: String, +} + +impl PkgTomlSource { + pub fn new(path: &Path, content: String) -> Self { + // We could also use `path.to_str()` for proper error handling: + let path = path.to_string_lossy().to_string(); + PkgTomlSource { content, uri: path } + } +} + +impl Source for PkgTomlSource { + fn clone_into_box(&self) -> Box { + Box::new((*self).clone()) + } + + fn collect(&self) -> Result, ConfigError> { + FileFormat::Toml + .parse(Some(&self.uri), &self.content) + .map_err(|cause| ConfigError::FileParse { + uri: Some(self.uri.clone()), + cause, + }) + } +} diff --git a/src/repository/repository.rs b/src/repository/repository.rs index f6db4d52..a58d3dfd 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -18,9 +18,6 @@ use anyhow::Context; use anyhow::Error; use anyhow::Result; use regex::Regex; -use resiter::AndThen; -use resiter::FilterMap; -use resiter::Map; use tracing::trace; use crate::package::Package; @@ -41,7 +38,7 @@ impl From> for Repository { } // A helper function to normalize relative Unix paths (ensures that one cannot escape using `..`): -fn normalize_relative_path(path: PathBuf) -> Result { +pub fn normalize_relative_path(path: PathBuf) -> Result { let mut normalized_path = PathBuf::new(); for component in path.components() { match component { @@ -110,30 +107,6 @@ impl Repository { trace!("Loading files from filesystem"); let fsr = FileSystemRepresentation::load(path.to_path_buf())?; - // Helper function to extract the `patches` array from a package config/definition: - fn get_patches( - config: &config::ConfigBuilder, - path: &Path, - ) -> Result> { - // TODO: Avoid unnecessary config building (inefficient): - let config = config.build_cloned().context(anyhow!( - "Failed to load the following TOML file: {}", - path.display() - ))?; - match config.get_array("patches") { - Ok(v) => v - .into_iter() - .map(config::Value::into_string) - .map_err(Error::from) - .map_err(|e| e.context("patches must be strings")) - .map_err(Error::from) - .map_ok(PathBuf::from) - .collect(), - Err(config::ConfigError::NotFound(_)) => Ok(Vec::with_capacity(0)), - Err(e) => Err(Error::from(e)), - } - } - let cwd = std::env::current_dir()?; let leaf_files = fsr .files() @@ -145,92 +118,72 @@ impl Repository { Err(e) => Some(Err(e)), }); progress.set_length(leaf_files.clone().count().try_into()?); - leaf_files.inspect(|r| trace!("Loading files for {:?}", r)) + leaf_files + .inspect(|r| trace!("Loading files for {:?}", r)) .map(|path| { progress.inc(1); let path = path?; - fsr.get_files_for(path)? + let config = fsr.get_files_for(path)? .iter() + // Load all "layers": .inspect(|(path, _)| trace!("Loading layer at {}", path.display())) - .fold(Ok(Config::builder()) as Result<_>, |config, (path, content)| { - let mut config = config?; - - let patches_before_merge = get_patches(&config, path)?; - config = config.add_source(config::File::from_str(content, config::FileFormat::Toml)); - let patches_after_merge = get_patches(&config, path)?; - - // TODO: Get rid of the unnecessarily complex handling of the `patches` configuration setting: - // Ideally this would be handled by the `config` crate (this is - // already the case for all other "settings" but in this case we also need - // to prepend the corresponding directory path). - let patches = if patches_before_merge == patches_after_merge { - patches_before_merge - } else { - // The patches have changed since the `config.merge()` of the next - // `pkg.toml` file so we have to build the paths to the patch files - // by prepending the path to the directory of the `pkg.toml` file since - // `path` is only available in this "iteration". - patches_after_merge - .into_iter() - .map(|p| if let Some(current_dir) = path.parent() { - // Prepend the path of the directory of the `pkg.toml` file to - // the name of the patch file: - let mut path = current_dir.join(p); - // Ensure that we use relative paths for the patches (the rest - // of the code that uses the patches doesn't work correctly - // with absolute paths): - if path.is_absolute() { - // We assume that cwd is part of the prefix (currently, the - // path comes from `git2::Repository::workdir()` and should - // always be absolute and start from cwd so this is fine): - path = path - .strip_prefix(&cwd) - .map(|p| p.to_owned()) - .with_context(|| anyhow!("Cannot strip the prefix {} form path {}", cwd.display(), current_dir.display()))?; - } - if path.is_absolute() { - Err(anyhow!("The path {} is absolute but it should be a relative path.", path.display())) - } else { - normalize_relative_path(path) - } - } else { - Err(anyhow!("Path should point to path with parent, but doesn't: {}", path.display())) - }) - .inspect(|patch| trace!("Patch: {:?}", patch)) - // If the patch file exists, use it (as config::Value). - // Otherwise we have an error here, because we're referring to a non-existing file: - .and_then_ok(|patch| if patch.exists() { - Ok(Some(patch)) - } else { - Err(anyhow!("The following patch does not exist: {}", patch.display())) - }) - .filter_map_ok(|o| o) - .collect::>>() - .with_context(|| anyhow!("Could not process the patches declared here: {}", path.display()))? - }; - - trace!("Patches after postprocessing merge: {:?}", patches); - let patches = patches - .into_iter() - .map(|p| p.display().to_string()) - .map(config::Value::from) - .collect::>(); - { - // Update the `patches` configuration setting: - let mut builder = Config::builder(); - builder = builder.set_default("patches", config::Value::from(patches))?; - config = config.add_source(builder.build()?); - // Ideally we'd use `config.set()` but that is a permanent override (so - // subsequent `config.merge()` merges won't have an effect on - // "patches"). There's also `config.set_once()` but that only lasts - // until the next `config.merge()` and `config.set_default()` only sets - // a default value. - } - Ok(config) + .fold(Config::builder(), |config_builder, (path, content)| { + use crate::repository::pkg_toml_source::PkgTomlSource; + config_builder.add_source(PkgTomlSource::new(path, (*content).to_string())) }) - .and_then(|c| c.build()?.try_deserialize::().map_err(Error::from) - .with_context(|| anyhow!("Could not load package configuration: {}", path.display()))) - .map(|pkg| ((pkg.name().clone(), pkg.version().clone()), pkg)) + .build()?; + + let patches_value = config.get_array("patches"); + let mut pkg = config + .try_deserialize::() + .map_err(Error::from) + .with_context(|| { + anyhow!("Could not load package configuration: {}", path.display()) + })?; + + if !pkg.patches().is_empty() { + // We have to build the full relative paths to the patch files by + // prepending the path to the directory of the `pkg.toml` file they've + // been defined in so that they can be found later. + let patches = patches_value.context(anyhow!( + "Bug: Could not get the \"patches\" value for: {}", + path.display() + ))?; + let first_patch_value = patches.first().ok_or(anyhow!( + "Bug: Could not get the first \"patches\" entry for: {}", + path.display() + ))?; + // Get the origin (path to the `pkg.toml` file) for the "patches" + // setting (it must currently be the same for all array entries): + let origin_path = first_patch_value.origin().map(PathBuf::from).ok_or(anyhow!( + "Bug: Could not get the origin of the first \"patches\" entry for: {}", + path.display() + ))?; + // Note: `parent()` only "Returns None if the path terminates in a root + // or prefix, or if it’s the empty string." so this should never happen: + let origin_dir_path = origin_path.parent().ok_or(anyhow!( + "Bug: Could not get the origin's parent of the first \"patches\" entry for: {}", + path.display() + ))?; + pkg.set_patches_base_dir(origin_dir_path, &cwd) + .with_context(|| { + anyhow!("Could not set the base directory for the patches declared here: {}", path.display()) + })?; + // Check if the patches exist: + for patch in pkg.patches() { + if !patch.exists() { + return Err(anyhow!( + "The following patch does not exist: {}", + patch.display() + )) + .with_context(|| { + anyhow!("Could not process the patches declared here: {}", path.display()) + }); + } + } + } + + Ok(((pkg.name().clone(), pkg.version().clone()), pkg)) }) .collect::>>() .map(Repository::new) From 5b04fcdac39a24d6a0c2e76fef30e35bcefadbdf Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 3 Jan 2025 15:31:23 +0100 Subject: [PATCH 119/150] Replace the `daggy` crate with `petgraph` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `daggy` crate doesn't seem maintained anymore as the last commit was over three years ago [0] and there isn't really any activity since then. Daggy is already based on top of `petgraph` and described as follows: > The most prominent type is Dag - a wrapper around petgraph’s Graph > data structure, exposing a refined API targeted towards directed > acyclic graph related functionality. This means that we can switch directly to `petgraph` without too much effort. We'll loose some of the refined API, especially walking graphs via iterators, but it doesn't really matter too much as the `Acyclic` type, "a wrapper around graph types that enforces an acyclicity invariant", works well enough (just a bit less "refined"). We also already used `petgraph` directly for the `tree-of` command. This direct dependency on `petgraph` became the trigger for dropping the dependency on `daggy` since `petgraph` yanked the release of version `0.6.6` with the new release of version `0.7.0` [1] and the resulting CI failure for the `petgraph` update [2] made me take a closer look at the situation (we don't necessarily have to drop `daggy` just yet but it seems for the best given it's unclear future and the duplicated `petgraph` dependency that causes incompatibilities / build failures). [0]: https://github.com/mitchmindtree/daggy [1]: https://github.com/petgraph/petgraph/issues/712 [2]: https://github.com/science-computing/butido/pull/446 Signed-off-by: Michael Weiss --- Cargo.lock | 11 -------- Cargo.toml | 1 - src/commands/tree_of.rs | 12 +++------ src/job/dag.rs | 18 ++++++------- src/package/dag.rs | 58 ++++++++++++++++++++++++----------------- 5 files changed, 46 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 206886c4..ce155460 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,6 @@ dependencies = [ "colored", "config", "csv", - "daggy", "dialoguer", "diesel", "diesel_migrations", @@ -527,16 +526,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "daggy" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91a9304e55e9d601a39ae4deaba85406d5c0980e106f65afcf0460e9af1e7602" -dependencies = [ - "petgraph", - "serde", -] - [[package]] name = "darling" version = "0.20.10" diff --git a/Cargo.toml b/Cargo.toml index 6b862373..64c10bcd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,6 @@ clap_complete = "4" colored = "2" config = { version = "0.15", default-features = false, features = [ "toml" ] } csv = "1" -daggy = { version = "0.8", features = [ "serde" ] } dialoguer = "0.11" diesel = { version = "2", features = ["postgres", "chrono", "uuid", "serde_json", "r2d2"] } diesel_migrations = "2" diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index 0ca2648e..86224558 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -14,14 +14,12 @@ use anyhow::Error; use anyhow::Result; use clap::ArgMatches; use petgraph::dot::Dot; -use petgraph::graph::DiGraph; use resiter::AndThen; use crate::config::Configuration; use crate::package::condition::ConditionData; use crate::package::Dag; use crate::package::DependencyType; -use crate::package::Package; use crate::package::PackageName; use crate::package::PackageVersionConstraint; use crate::repository::Repository; @@ -73,10 +71,8 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat .map(|package| Dag::for_root_package(package.clone(), &repo, None, &condition_data)) .and_then_ok(|dag| { if dot { - let petgraph: DiGraph = (*dag.dag()).clone().into(); - let dot = Dot::with_attr_getters( - &petgraph, + dag.dag(), &[ petgraph::dot::Config::EdgeNoLabel, petgraph::dot::Config::NodeNoLabel, @@ -96,13 +92,11 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat println!("{:?}", dot); Ok(()) } else if serial_buildorder { - let petgraph: DiGraph = (*dag.dag()).clone().into(); - - let topo_sorted = petgraph::algo::toposort(&petgraph, None) + let topo_sorted = petgraph::algo::toposort(dag.dag(), None) .map_err(|_| Error::msg("Cyclic dependency found!"))?; for node in topo_sorted.iter().rev() { - let package = petgraph.node_weight(*node).unwrap(); + let package = dag.dag().node_weight(*node).unwrap(); println!("{}", package.display_name_version()); } println!(); diff --git a/src/job/dag.rs b/src/job/dag.rs index 077c9e4e..90977381 100644 --- a/src/job/dag.rs +++ b/src/job/dag.rs @@ -8,9 +8,9 @@ // SPDX-License-Identifier: EPL-2.0 // -use daggy::Dag as DaggyDag; -use daggy::Walker; use getset::Getters; +use petgraph::acyclic::Acyclic; +use petgraph::graph::DiGraph; use uuid::Uuid; use crate::job::Job; @@ -24,7 +24,7 @@ use crate::util::docker::ImageName; #[derive(Debug, Getters)] pub struct Dag { #[getset(get = "pub")] - dag: DaggyDag, + dag: Acyclic>, } impl Dag { @@ -46,17 +46,17 @@ impl Dag { }; Dag { - dag: dag.dag().map(build_job, |_, e| (*e).clone()), + dag: Acyclic::<_>::try_from_graph(dag.dag().map(build_job, |_, e| (*e).clone())) + .unwrap(), // The dag.dag() is already acyclic so this cannot fail } } pub fn iter(&'_ self) -> impl Iterator + '_ { - self.dag.graph().node_indices().map(move |idx| { - let job = self.dag.graph().node_weight(idx).unwrap(); // TODO - let children = self.dag.children(idx); + self.dag.node_indices().map(move |idx| { + let job = self.dag.node_weight(idx).unwrap(); // TODO + let children = self.dag.neighbors_directed(idx, petgraph::Outgoing); let children_uuids = children - .iter(&self.dag) - .filter_map(|(_, node_idx)| self.dag.graph().node_weight(node_idx)) + .filter_map(|node_idx| self.dag.node_weight(node_idx)) .map(Job::uuid) .cloned() .collect(); diff --git a/src/package/dag.rs b/src/package/dag.rs index dea1ed94..0d69be29 100644 --- a/src/package/dag.rs +++ b/src/package/dag.rs @@ -15,12 +15,15 @@ use std::io::Write; use anyhow::anyhow; use anyhow::Context; -use anyhow::Error; use anyhow::Result; -use daggy::Walker; use getset::Getters; use indicatif::ProgressBar; use itertools::Itertools; +use petgraph::acyclic::Acyclic; +use petgraph::data::Build; +use petgraph::graph::DiGraph; +use petgraph::graph::EdgeIndex; +use petgraph::graph::NodeIndex; use ptree::Style; use ptree::TreeItem; use resiter::AndThen; @@ -37,10 +40,10 @@ use crate::repository::Repository; #[derive(Debug, Getters)] pub struct Dag { #[getset(get = "pub")] - dag: daggy::Dag, + dag: Acyclic>, #[getset(get = "pub")] - root_idx: daggy::NodeIndex, + root_idx: NodeIndex, } #[derive(Clone, PartialEq, Eq, Hash, Debug)] @@ -114,8 +117,8 @@ impl Dag { /// and adds corresponding nodes to the DAG. The edges are added later in `add_edges()`. fn add_sub_packages<'a>( repo: &'a Repository, - mappings: &mut HashMap<&'a Package, daggy::NodeIndex>, - dag: &mut daggy::Dag<&'a Package, DependencyType>, + mappings: &mut HashMap<&'a Package, NodeIndex>, + dag: &mut Acyclic>, p: &'a Package, progress: Option<&ProgressBar>, conditional_data: &ConditionData<'_>, @@ -180,8 +183,8 @@ impl Dag { // TODO: It seems easier and more efficient to do this in `add_sub_packages` as well (it // makes that function more complex but doing it separately is weird). fn add_edges( - mappings: &HashMap<&Package, daggy::NodeIndex>, - dag: &mut daggy::Dag<&Package, DependencyType>, + mappings: &HashMap<&Package, NodeIndex>, + dag: &mut Acyclic>, conditional_data: &ConditionData<'_>, ) -> Result<()> { for (package, idx) in mappings { @@ -193,9 +196,14 @@ impl Dag { *pkg.name() == dep_name && dep_constr.matches(pkg.version()) }) .try_for_each(|(dep, dep_idx)| { - dag.add_edge(*idx, *dep_idx, dep_kind.clone()) + dag.try_add_edge(*idx, *dep_idx, dep_kind.clone()) .map(|_| ()) - .map_err(Error::from) + // Only debug formatting is available for the error and for + // cycles it is quite useless (the context below is much more + // helpful than, e.g., "Cycle(Cycle(NodeIndex(0)))") but we'll + // include it for completeness and in case of the other errors + // that could theoretically occur: + .map_err(|e| anyhow!(format!("{e:?}"))) .with_context(|| { anyhow!( "Failed to add package dependency DAG edge \ @@ -215,7 +223,7 @@ impl Dag { } // Create an empty DAG and use the above helper functions to compute the dependency graph: - let mut dag: daggy::Dag<&Package, DependencyType> = daggy::Dag::new(); + let mut dag = Acyclic::>::new(); let mut mappings = HashMap::new(); trace!("Building the package dependency DAG for package {:?}", p); @@ -234,10 +242,11 @@ impl Dag { trace!("Finished building the package DAG"); Ok(Dag { - dag: dag.map( + dag: Acyclic::<_>::try_from_graph(dag.map( |_, p: &&Package| -> Package { (*p).clone() }, |_, e| (*e).clone(), - ), + )) + .unwrap(), // The dag is already acyclic so this cannot fail root_idx, }) } @@ -249,9 +258,8 @@ impl Dag { /// The order of the packages is _NOT_ guaranteed by the implementation pub fn all_packages(&self) -> Vec<&Package> { self.dag - .graph() .node_indices() - .filter_map(|idx| self.dag.graph().node_weight(idx)) + .filter_map(|idx| self.dag.node_weight(idx)) .collect() } @@ -261,7 +269,7 @@ impl Dag { } #[derive(Clone)] -pub struct DagDisplay<'a>(&'a Dag, daggy::NodeIndex, Option); +pub struct DagDisplay<'a>(&'a Dag, NodeIndex, Option); impl TreeItem for DagDisplay<'_> { type Child = Self; @@ -270,7 +278,6 @@ impl TreeItem for DagDisplay<'_> { let p = self .0 .dag - .graph() .node_weight(self.1) .ok_or_else(|| anyhow!("Error finding node: {:?}", self.1)) .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; @@ -281,7 +288,6 @@ impl TreeItem for DagDisplay<'_> { Some(edge_idx) => self .0 .dag - .graph() .edge_weight(edge_idx) .ok_or_else(|| anyhow!("Error finding edge: {:?}", self.2)) .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?, @@ -295,12 +301,16 @@ impl TreeItem for DagDisplay<'_> { } fn children(&self) -> Cow<[Self::Child]> { - let c = self.0.dag.children(self.1); - Cow::from( - c.iter(&self.0.dag) - .map(|(edge_idx, node_idx)| DagDisplay(self.0, node_idx, Some(edge_idx))) - .collect::>(), - ) + let mut children_walker = self + .0 + .dag + .neighbors_directed(self.1, petgraph::Outgoing) + .detach(); + let mut children = Vec::::new(); + while let Some((edge_idx, node_idx)) = children_walker.next(&self.0.dag) { + children.push(DagDisplay(self.0, node_idx, Some(edge_idx))); + } + Cow::from(children) } } From 070c8af45a12a31902a9d01b03d4fe41c184a0e8 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 7 Jan 2025 14:55:47 +0100 Subject: [PATCH 120/150] Fix the CLI documentation regarding package version constraints We might want to add an abstraction for those arguments in the future to make this easier but at least the arguments are now all named `package_version_constraint` with the argument value name `VERSION_CONSTRAINT` (e.g., in the help output), and a help text / description that makes clear that this is a version constraint and not a single, exact version. The documentation of the package version arguments for the `source {verify,url,of}` subcommands didn't match the code (a `PackageVersionConstraint` is used in the code). Signed-off-by: Michael Weiss --- src/cli.rs | 32 ++++++++++++++++---------------- src/commands/lint.rs | 2 +- src/commands/source/download.rs | 5 +++-- src/commands/source/mod.rs | 6 +++--- src/commands/tree_of.rs | 2 +- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 4b07dfda..34e6d093 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -599,7 +599,7 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), e.g., '=1.0.0'") + .help("A version constraint to match the package version against (optional), e.g., '=1.0.0'") ) .arg(Arg::new("no_script_filter") .action(ArgAction::SetTrue) @@ -645,7 +645,7 @@ pub fn cli() -> Command { .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), e.g., '=1.0.0'") + .help("A version constraint to match the package version against (optional), e.g., '=1.0.0'") ) .arg(Arg::new("terse") @@ -766,11 +766,11 @@ pub fn cli() -> Command { .value_name("PKG") .help("Verify the sources of this package (optional, if left out, all packages are checked)") ) - .arg(Arg::new("package_version") + .arg(Arg::new("package_version_constraint") .required(false) .index(2) - .value_name("VERSION") - .help("Verify the sources of this package version (optional, if left out, all versions are checked)") + .value_name("VERSION_CONSTRAINT") + .help("Verify the sources of matching package versions (optional, if left out, all versions are checked)") ) .arg(Arg::new("matching") @@ -796,11 +796,11 @@ pub fn cli() -> Command { .value_name("PKG") .help("Show the URL of this package (or all packages, if omitted)") ) - .arg(Arg::new("package_version") + .arg(Arg::new("package_version_constraint") .required(false) .index(2) - .value_name("VERSION") - .help("Show the URL of this package version (or all versions, if omitted)") + .value_name("VERSION_CONSTRAINT") + .help("Show the URLs of matching package versions (or all versions, if omitted)") ) ) .subcommand(Command::new("download") @@ -811,11 +811,11 @@ pub fn cli() -> Command { .value_name("PKG") .help("Download the sources of this package") ) - .arg(Arg::new("package_version") + .arg(Arg::new("package_version_constraint") .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("Download the sources of this package version (optional, if left out, all versions are downloaded)") + .help("Download the sources of matching package versions (optional, if left out, all versions are downloaded)") ) .arg(Arg::new("force") .action(ArgAction::SetTrue) @@ -852,11 +852,11 @@ pub fn cli() -> Command { .value_name("PKG") .help("Get the source file paths for this package (or all packages, if omitted)") ) - .arg(Arg::new("package_version") + .arg(Arg::new("package_version_constraint") .required(false) .index(2) - .value_name("VERSION") - .help("Get the source file paths for the package in this version (or all versions, if omitted)") + .value_name("VERSION_CONSTRAINT") + .help("Get the source file paths for the package in matching versions (or all versions, if omitted)") ) ) ) @@ -959,11 +959,11 @@ pub fn cli() -> Command { .value_name("NAME") .help("Package name to lint (if not present, every package will be linted)") ) - .arg(Arg::new("package_version") + .arg(Arg::new("package_version_constraint") .required(false) .index(2) .value_name("VERSION_CONSTRAINT") - .help("A version constraint to search for (optional), e.g., '=1.0.0'") + .help("A version constraint to match the package version against (optional), e.g., '=1.0.0'") ) ) @@ -975,7 +975,7 @@ pub fn cli() -> Command { .value_name("NAME") .help("Package name to print the dependency tree of") ) - .arg(Arg::new("package_version") + .arg(Arg::new("package_version_constraint") .required(false) .index(2) .value_name("VERSION_CONSTRAINT") diff --git a/src/commands/lint.rs b/src/commands/lint.rs index 8d3463f5..ddbb97b4 100644 --- a/src/commands/lint.rs +++ b/src/commands/lint.rs @@ -37,7 +37,7 @@ pub async fn lint( .map(|s| s.to_owned()) .map(PackageName::from); let pvers = matches - .get_one::("package_version") + .get_one::("package_version_constraint") .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose()?; diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index 73244eac..0b01ab26 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -213,7 +213,7 @@ pub async fn download( .map(|s| s.to_owned()) .map(PackageName::from); let pvers = matches - .get_one::("package_version") + .get_one::("package_version_constraint") .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose()?; @@ -245,8 +245,9 @@ pub async fn download( // check if the iterator is empty if r.peek().is_none() { + // TODO: Duplication: let pname = matches.get_one::("package_name"); - let pvers = matches.get_one::("package_version"); + let pvers = matches.get_one::("package_version_constraint"); let matching_regexp = matches.get_one::("matching"); match (pname, pvers, matching_regexp) { diff --git a/src/commands/source/mod.rs b/src/commands/source/mod.rs index 6dba295d..355554b2 100644 --- a/src/commands/source/mod.rs +++ b/src/commands/source/mod.rs @@ -64,7 +64,7 @@ pub async fn verify( .map(|s| s.to_owned()) .map(PackageName::from); let pvers = matches - .get_one::("package_version") + .get_one::("package_version_constraint") .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose()?; @@ -194,7 +194,7 @@ pub async fn url(matches: &ArgMatches, repo: Repository) -> Result<()> { .map(|s| s.to_owned()) .map(PackageName::from); let pvers = matches - .get_one::("package_version") + .get_one::("package_version_constraint") .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose()?; @@ -230,7 +230,7 @@ async fn of(matches: &ArgMatches, config: &Configuration, repo: Repository) -> R .map(|s| s.to_owned()) .map(PackageName::from); let pvers = matches - .get_one::("package_version") + .get_one::("package_version_constraint") .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose()?; diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs index ea2f2df4..1b0db3ad 100644 --- a/src/commands/tree_of.rs +++ b/src/commands/tree_of.rs @@ -31,7 +31,7 @@ pub async fn tree_of(matches: &ArgMatches, repo: Repository, config: &Configurat .map(|s| s.to_owned()) .map(PackageName::from); let pvers = matches - .get_one::("package_version") + .get_one::("package_version_constraint") .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose()?; From 4e2685ddd605a09acbd7283340508d5ba2da23a1 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 7 Jan 2025 15:08:18 +0100 Subject: [PATCH 121/150] Fix the CLI documentation of the `env-of` subcommand The code uses a `PackageVersion` and not a `PackageVersionConstraint`. Signed-off-by: Michael Weiss --- src/cli.rs | 4 ++-- src/commands/env_of.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 34e6d093..a957a6ac 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -579,10 +579,10 @@ pub fn cli() -> Command { .value_name("PACKAGE_NAME") .help("The name of the package") ) - .arg(Arg::new("package_version_constraint") + .arg(Arg::new("package_version") .required(true) .index(2) - .value_name("VERSION_CONSTRAINT") + .value_name("PACKAGE_VERSION") .help("The version of the package") ) ) diff --git a/src/commands/env_of.rs b/src/commands/env_of.rs index e8e48810..d44f7a2d 100644 --- a/src/commands/env_of.rs +++ b/src/commands/env_of.rs @@ -29,19 +29,19 @@ pub async fn env_of(matches: &ArgMatches, repo: Repository) -> Result<()> { .map(|s| s.to_owned()) .map(PackageName::from) .unwrap(); - let constraint = matches - .get_one::("package_version_constraint") + let version = matches + .get_one::("package_version") .map(|s| s.to_owned()) .map(PackageVersion::try_from) .unwrap()?; trace!( "Checking for package with name = {} and version = {:?}", name, - constraint + version ); crate::util::filters::build_package_filter_by_name(name).and( - crate::util::filters::build_package_filter_by_version(constraint), + crate::util::filters::build_package_filter_by_version(version), ) }; From e4b14cd4b2ee6175fa79aa5765917e3769e0883f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 7 Jan 2025 15:12:51 +0100 Subject: [PATCH 122/150] Fix the package version constraint argument for `dependencies-of` The `dependencies-of` subcommand has an optional `VERSION_CONSTRAINT` argument (s. `src/cli.rs`) but during my checks I noticed that it wasn't used/implemented in the code. This fixes that by implementing it. Signed-off-by: Michael Weiss --- src/commands/dependencies_of.rs | 16 +++++++++++++++- src/util/filters.rs | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/commands/dependencies_of.rs b/src/commands/dependencies_of.rs index 2700054d..ee46024e 100644 --- a/src/commands/dependencies_of.rs +++ b/src/commands/dependencies_of.rs @@ -12,6 +12,7 @@ use std::io::Write; +use anyhow::Context; use anyhow::Result; use clap::ArgMatches; use futures::stream::StreamExt; @@ -21,6 +22,7 @@ use tracing::trace; use crate::commands::util::getbool; use crate::config::*; use crate::package::PackageName; +use crate::package::PackageVersionConstraint; use crate::repository::Repository; use crate::ui::*; @@ -39,8 +41,20 @@ pub async fn dependencies_of( .map(PackageName::from) .unwrap(); trace!("Checking for package with name = {}", name); + let version_constraint = matches + .get_one::("package_version_constraint") + .map(|s| s.to_owned()) + .map(PackageVersionConstraint::try_from) + .transpose() + .context("Parsing package version constraint")?; + trace!( + "Checking for package with version constraint = {:?}", + version_constraint + ); - crate::util::filters::build_package_filter_by_name(name) + crate::util::filters::build_package_filter_by_name(name).and( + crate::util::filters::build_package_filter_by_version_constraint(version_constraint), + ) }; let format = config.package_print_format(); diff --git a/src/util/filters.rs b/src/util/filters.rs index 2c548e90..3bb4f375 100644 --- a/src/util/filters.rs +++ b/src/util/filters.rs @@ -17,6 +17,7 @@ use tracing::trace; use crate::package::Package; use crate::package::PackageName; use crate::package::PackageVersion; +use crate::package::PackageVersionConstraint; use crate::package::ParseDependency; /// Helper function to build a package filter based on some flags and the package version @@ -88,6 +89,22 @@ pub fn build_package_filter_by_version( } } +pub fn build_package_filter_by_version_constraint( + version_constraint: Option, +) -> impl filters::filter::Filter { + move |p: &Package| { + trace!( + "Checking {:?} -> version matches constraint: {:?}", + p, + version_constraint + ); + version_constraint + .as_ref() + .map(|v| v.matches(p.version())) + .unwrap_or(true) + } +} + #[cfg(test)] mod tests { use super::*; From d0536792569abfb98b37429a1278db523304f45b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 7 Jan 2025 15:22:49 +0100 Subject: [PATCH 123/150] Cleanup two old package version constraint parsing error contexts Those don't match the implementation anymore and we already return a more appropriate error context/hint in the `TryFrom` implementation for `PackageVersionConstraint`. Signed-off-by: Michael Weiss --- src/commands/find_artifact.rs | 3 +-- src/commands/find_pkg.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commands/find_artifact.rs b/src/commands/find_artifact.rs index b42130c3..2349291f 100644 --- a/src/commands/find_artifact.rs +++ b/src/commands/find_artifact.rs @@ -50,8 +50,7 @@ pub async fn find_artifact( .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose() - .context("Parsing package version constraint") - .context("A valid package version constraint looks like this: '=1.0.0'")?; + .context("Parsing package version constraint")?; let env_filter = matches .get_many::("env_filter") diff --git a/src/commands/find_pkg.rs b/src/commands/find_pkg.rs index c998b4f1..ba157199 100644 --- a/src/commands/find_pkg.rs +++ b/src/commands/find_pkg.rs @@ -39,8 +39,7 @@ pub async fn find_pkg( .map(|s| s.to_owned()) .map(PackageVersionConstraint::try_from) .transpose() - .context("Parsing package version constraint") - .context("A valid package version constraint looks like this: '=1.0.0'")?; + .context("Parsing package version constraint")?; let iter = repo .packages() From c1dcb78ee264758ea83144d3a7c136f5f62eab15 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 7 Jan 2025 19:16:17 +0100 Subject: [PATCH 124/150] Make `semver::Op::Exact` the default for `PackageVersionConstraint` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This seems like a much better and safer default than `semver::On::Caret`, which I chose in fe0df00. It's more intuitive and it's also the best way to support both our strict implementation for `=` (full version matches only) as well as `semver::Op::Exact` (partial version matches are supported). I don't remember why I previously picked `^` (Caret / "compatible" updates) as the default - probably just because it's the default that the `semver` crate uses [0] (since the crate is for Cargo's flavor of SemVer [1]) and I didn't spend much thought on it. [0]: https://github.com/dtolnay/semver/blob/1.0.24/src/parse.rs#L158 [1]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements Signed-off-by: Michael Weiss --- src/package/version.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/package/version.rs b/src/package/version.rs index 12c7c1c6..3d077a82 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -46,8 +46,15 @@ impl PackageVersionConstraint { use semver::{Version, VersionReq}; match self.constraint.as_str() { "" => { + // We default to `Op::Exact` (=) to enable partial version specification + // (e.g., only the major and minor or only the major version): + // https://docs.rs/semver/latest/semver/enum.Op.html#opexact + // Our own implementation of "=" (s. below) allows only a single version to match + // while `semver::Op::Exact` can result in multiple versions matching if only a + // "partial" version is provided. + let default_constraint = String::from("="); let constraint = - VersionReq::parse(&(self.constraint.clone() + self.version.as_str())).unwrap(); + VersionReq::parse(&(default_constraint + self.version.as_str())).unwrap(); let version = Version::parse(v.as_str()).unwrap(); constraint.matches(&version) From 0b80673d2e972fd6a42e07488076c19ec60c2951 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 8 Jan 2025 15:49:16 +0100 Subject: [PATCH 125/150] Add a fallback for parsing `PackageVersion` into `semver::Version` The `PackageVersionConstraint::matches()` function currently only returns a boolean which is very bad for error handling as this results in a butido crash ("bug") instead of a pretty error message of what went wrong. This change doesn't fix that issue but at least it makes the method much more reliable/usable/suitable. Our version specification isn't compatible with `semver::Version` so I decided to implement a fallback parser so that any `PackageVersion` can be converted into a (at least somewhat appropriate) `semver::Version`. This might cause issues in special cases but it should work well enough for any sane version numbers/strings (in our cases we only ran into this issue with "partial" version numbers like FFmpeg 7.1 (no patch version) or versions with non-numeric characters like tmux 3.5a. Signed-off-by: Michael Weiss --- src/package/version.rs | 62 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/src/package/version.rs b/src/package/version.rs index 3d077a82..eb355235 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -15,6 +15,7 @@ use anyhow::Context; use anyhow::Error; use anyhow::Result; use pom::parser::Parser as PomParser; +use regex::Regex; use serde::Deserialize; use serde::Serialize; @@ -55,7 +56,16 @@ impl PackageVersionConstraint { let default_constraint = String::from("="); let constraint = VersionReq::parse(&(default_constraint + self.version.as_str())).unwrap(); - let version = Version::parse(v.as_str()).unwrap(); + let version = Version::parse(v.as_str()) + .with_context(|| anyhow!("Failed to parse the package version as semver::Version")) + .or_else(|eo| v.clone().try_into().map_err(|e: Error| e.context(eo))) + .with_context(|| anyhow!("Also failed to parse the package version using our own SemVer converter")) + .unwrap_or_else(|e| panic!( + "Failed to parse the package version \"{}\" as SemVer to check if it matches \"{}\". Error: {:#}", + v, + constraint, + e + )); constraint.matches(&version) } @@ -137,6 +147,56 @@ impl From for PackageVersion { } } +impl TryInto for PackageVersion { + type Error = anyhow::Error; + + // TODO: Improve or replace this spaghetti code that we only use as a fallback (the unwrap()s + // should be safe as long as the static regex guarantees the assumptions): + fn try_into(self) -> Result { + // Warning: This regex must remain identical to the one in the parser below!: + let version_regex = + Regex::new("^([[:digit:]]+)(?:([[:digit:]]+)|[-_.]|[[:alpha:]]+)*$").unwrap(); + // This regex is based on PackageVersion::parser() below. We use capture groups to extract + // the numbers and the "(?:exp)" syntax is for a non-capturing group. + + if let Some(captures) = version_regex.captures(&self.0) { + // For debugging: println!("{:?}", captures); + let mut captures = captures.iter(); + // Ignore the full match (index 0): + captures.next(); + // The first match must be present and be a positive number if the regex matched!: + let major = captures.next().unwrap().unwrap().as_str().parse()?; + + // Try to extract the minor and patch versions: + let mut versions = Vec::::new(); + for match_group in captures { + // The unwrap() should be safe as the match group only exists if there is a match: + let match_str = match_group.unwrap().as_str(); + versions.push(match_str.parse()?); + } + + // Return what is hopefully the corresponding SemVer (the minor and patch version + // default to zero if they couldn't be extracted from PackageVersion): + Ok(semver::Version::new( + major, + *versions.first().unwrap_or(&0), + *versions.get(1).unwrap_or(&0), + )) + } else { + Err(anyhow!( + "The regex \"{}\" for parsing the PackageVersion didn't match", + version_regex + )) + } + .with_context(|| { + anyhow!( + "The PackageVersion \"{}\" couldn't be converted into a semver::Version", + self + ) + }) + } +} + impl PackageVersion { fn parser<'a>() -> PomParser<'a, u8, Self> { (numbers() + ((dash() | under() | dot() | letters() | numbers()).repeat(0..))) From e378d60ba64da313d5a9c8960d0c2c7df09f62a7 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 8 Jan 2025 17:25:46 +0100 Subject: [PATCH 126/150] Fix the fallback for parsing `PackageVersion` into `semver::Version` I later noticed that the previous iteration didn't work as "recursive" capture groups aren't supported (so the nested numbered capture group for the version number(s) in the outer non-capturing group that may match zero or more times doesn't result in more than one capturing group and only the last match will be returned for the capturing group). This new logic fixes that but it's still far from ideal... I also noticed that butido doesn't seem to do any verification of the version numbers using `PackageVersion::parser()` so far - at least in the code branches that I tested so we definitely should change that. Signed-off-by: Michael Weiss --- src/package/version.rs | 68 +++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/src/package/version.rs b/src/package/version.rs index eb355235..6410b329 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -153,47 +153,59 @@ impl TryInto for PackageVersion { // TODO: Improve or replace this spaghetti code that we only use as a fallback (the unwrap()s // should be safe as long as the static regex guarantees the assumptions): fn try_into(self) -> Result { - // Warning: This regex must remain identical to the one in the parser below!: - let version_regex = - Regex::new("^([[:digit:]]+)(?:([[:digit:]]+)|[-_.]|[[:alpha:]]+)*$").unwrap(); - // This regex is based on PackageVersion::parser() below. We use capture groups to extract - // the numbers and the "(?:exp)" syntax is for a non-capturing group. - - if let Some(captures) = version_regex.captures(&self.0) { + // Warning: This regex must remain compatible to the one in the PackageVersion::parser below!: + let version_regex = Regex::new("^(?:([[:digit:]]+)|[-_.]|[[:alpha:]]+)").unwrap(); + // This regex is based on PackageVersion::parser() below. We use a capture group to extract + // the numbers and the "(?:exp)" syntax is for a non-capturing group. If it matches we'll + // have the entire match in \0 and if it's a number it'll be in \1. + + // Our input (version string): + let mut version_str = self.0.as_str(); + // Our results (extracted version numbers): + let mut versions = Vec::::new(); + + // This loop is dangerous... Ensure that the match gets removed from version_str in every + // iteration to avoid an endless loop! + while let Some(captures) = version_regex.captures(version_str) { // For debugging: println!("{:?}", captures); - let mut captures = captures.iter(); - // Ignore the full match (index 0): - captures.next(); - // The first match must be present and be a positive number if the regex matched!: - let major = captures.next().unwrap().unwrap().as_str().parse()?; - - // Try to extract the minor and patch versions: - let mut versions = Vec::::new(); - for match_group in captures { - // The unwrap() should be safe as the match group only exists if there is a match: - let match_str = match_group.unwrap().as_str(); - versions.push(match_str.parse()?); + + let match_str = captures.get(0).unwrap().as_str(); // Unwrap safe as \0 always exists + version_str = &version_str[match_str.len()..]; + + if let Some(version_match) = captures.get(1) { + // We have a non-empty (version) number match + let version = version_match.as_str().parse()?; + versions.push(version); } + } + if version_str.is_empty() { // Return what is hopefully the corresponding SemVer (the minor and patch version // default to zero if they couldn't be extracted from PackageVersion): Ok(semver::Version::new( - major, *versions.first().unwrap_or(&0), *versions.get(1).unwrap_or(&0), + *versions.get(2).unwrap_or(&0), )) } else { + // We couldn't parse the entire version string -> report an error: Err(anyhow!( - "The regex \"{}\" for parsing the PackageVersion didn't match", - version_regex + "The following rest of the package version couldn't be parsed: {}", + version_str )) + .with_context(|| { + anyhow!( + "The regex \"{}\" for parsing the PackageVersion didn't match", + version_regex + ) + }) + .with_context(|| { + anyhow!( + "The PackageVersion \"{}\" couldn't be converted into a semver::Version", + self + ) + }) } - .with_context(|| { - anyhow!( - "The PackageVersion \"{}\" couldn't be converted into a semver::Version", - self - ) - }) } } From 2da1edd3107cf3857d0ab3edda000226ebd66127 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 8 Jan 2025 17:42:12 +0100 Subject: [PATCH 127/150] Fix the error handling for parsing `PackageVersionConstraint`s without = We currently support two kinds of `PackageVersionConstraint`: 1) Exact version matches (`=$VERSION`): Those are implemented using string comparison (`==`). 2) Exact but partial version matches (`$VERSION`): Those are implemented using the `semver` crate and `semver::Op::Exact` (`=$VERSION`). In the second case the version number/string must be a valid `semver::VersionReq` which is more strict than our butido versions (especially since we have a parser for `PackageVersion` but it isn't used to validate the versions yet). We didn't check this in `PackageVersionConstraint::parser()` before so butido would panic in `PackageVersionConstraint::matches()` instead of returning an appropriate error message if the provided `PackageVersionConstraint` isn't "valid". This fixes that by attempting to parse the version using the `semver` crate in the `parser()` function as well (we need it to parse it as `VersionReq` since `Version` must be a full version (including the minor and patch versions) - I therefore decide to deduplicate `default_constraint` using a private function). Signed-off-by: Michael Weiss --- src/package/version.rs | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/package/version.rs b/src/package/version.rs index 6410b329..afb432a7 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -28,13 +28,27 @@ pub struct PackageVersionConstraint { } impl PackageVersionConstraint { + fn get_default_constraint() -> String { + // We default to `Op::Exact` (=) to enable partial version specification + // (e.g., only the major and minor or only the major version): + // https://docs.rs/semver/latest/semver/enum.Op.html#opexact + // Our own implementation of "=" (s. below) allows only a single version to match + // while `semver::Op::Exact` can result in multiple versions matching if only a + // "partial" version is provided. + String::from("=") + } + fn parser<'a>() -> PomParser<'a, u8, Self> { (pom::parser::sym(b'=').opt() + PackageVersion::parser()) .convert(|(constraint, version)| { if let Some(c) = constraint { - String::from_utf8(vec![c]).map(|c| (c, version)) + String::from_utf8(vec![c]) + .map(|c| (c, version)) + .map_err(Error::from) } else { - Ok(("".to_string(), version)) + semver::VersionReq::parse(&(Self::get_default_constraint() + &version)) + .map(|_| ("".to_string(), version)) + .map_err(Error::from) } }) .map(|(constraint, version)| PackageVersionConstraint { @@ -47,15 +61,9 @@ impl PackageVersionConstraint { use semver::{Version, VersionReq}; match self.constraint.as_str() { "" => { - // We default to `Op::Exact` (=) to enable partial version specification - // (e.g., only the major and minor or only the major version): - // https://docs.rs/semver/latest/semver/enum.Op.html#opexact - // Our own implementation of "=" (s. below) allows only a single version to match - // while `semver::Op::Exact` can result in multiple versions matching if only a - // "partial" version is provided. - let default_constraint = String::from("="); let constraint = - VersionReq::parse(&(default_constraint + self.version.as_str())).unwrap(); + VersionReq::parse(&(Self::get_default_constraint() + self.version.as_str())) + .unwrap(); let version = Version::parse(v.as_str()) .with_context(|| anyhow!("Failed to parse the package version as semver::Version")) .or_else(|eo| v.clone().try_into().map_err(|e: Error| e.context(eo))) From 5dee90122402d949697e68fc0fb12047041ba112 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 9 Jan 2025 13:36:30 +0100 Subject: [PATCH 128/150] Make `PackageVersion` accept (and ignore) a `=` in front of the version This is done to make it "compatible"/interchangeable with `PackageVersionConstraint` (we'll probably only allow it temporarily until we properly sort out the versioning and handling of dependency specifications). Signed-off-by: Michael Weiss --- src/package/version.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package/version.rs b/src/package/version.rs index afb432a7..7c187ffd 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -151,7 +151,7 @@ impl AsRef for PackageVersion { impl From for PackageVersion { fn from(s: String) -> Self { - PackageVersion(s) + PackageVersion(s.trim_start_matches('=').to_string()) } } From b2388c516a70a1b2db6238c93f20e72a76d2147d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 8 Jan 2025 19:36:09 +0100 Subject: [PATCH 129/150] Switch the package dependency resolving to normal `PackageVersion`s The current logic was never capable of properly handling `PackageVersionConstraint` but this wasn't an issue so far since the only supported constraint was an exact version match using `=`. I decided to temporarily switch this code to just `PackageVersion` before properly implementing this to avoid potential "regressions". (The current code works fine with `PackageVersionConstraint` but the logic doesn't make sense as all matching versions would be build instead of only the newest one - this isn't an issue as long as the `pkg.toml` files aren't changed to use versions that aren't prefixed using `=` but let's avoid this potential issue for now.) Signed-off-by: Michael Weiss --- src/package/dag.rs | 29 ++++++++++++------------ src/package/dependency/build.rs | 4 ++-- src/package/dependency/mod.rs | 37 +++++++++++++------------------ src/package/dependency/runtime.rs | 4 ++-- src/package/version.rs | 1 + src/repository/repository.rs | 14 +++++------- 6 files changed, 42 insertions(+), 47 deletions(-) diff --git a/src/package/dag.rs b/src/package/dag.rs index f58517ee..84d51257 100644 --- a/src/package/dag.rs +++ b/src/package/dag.rs @@ -31,7 +31,7 @@ use crate::package::condition::ConditionData; use crate::package::dependency::ParseDependency; use crate::package::Package; use crate::package::PackageName; -use crate::package::PackageVersionConstraint; +use crate::package::PackageVersion; use crate::repository::Repository; #[derive(Debug, Getters)] @@ -63,12 +63,12 @@ impl Dag { dependency: &D, dependency_type: DependencyType, conditional_data: &ConditionData<'_>, - ) -> Result<(bool, PackageName, PackageVersionConstraint, DependencyType)> { + ) -> Result<(bool, PackageName, PackageVersion, DependencyType)> { // Check whether the condition of the dependency matches our data let take = dependency.check_condition(conditional_data)?; let (name, version) = dependency.parse_as_name_and_version()?; - // (dependency check result, name of the dependency, version constraint of the + // (dependency check result, name of the dependency, version of the // dependency, and type (build/runtime)) Ok((take, name, version, dependency_type)) } @@ -83,7 +83,7 @@ impl Dag { fn get_package_dependencies<'a>( package: &'a Package, conditional_data: &'a ConditionData<'_>, - ) -> impl Iterator> + 'a + ) -> impl Iterator> + 'a { trace!("Collecting the dependencies of {package:?} {conditional_data:?}"); package @@ -121,16 +121,16 @@ impl Dag { conditional_data: &ConditionData<'_>, ) -> Result<()> { get_package_dependencies(p, conditional_data) - .and_then_ok(|(name, constr, kind)| { + .and_then_ok(|(name, version, kind)| { trace!( "Processing the following dependency of {} {}: {} {} {:?}", p.name(), p.version(), name, - constr, + version, kind ); - let packs = repo.find_with_version(&name, &constr); + let packs = repo.find_with_version(&name, &version); trace!( "Found the following matching packages in the repo: {:?}", packs @@ -141,7 +141,7 @@ impl Dag { p.name(), p.version(), name, - constr + version )); } @@ -154,10 +154,11 @@ impl Dag { }) { // TODO: It should be sufficient to process a single package of `packs`. // The `packs` vector contains a list of all packages in the repo that - // match the dependency specification (PackageName and - // PackageVersionConstraint). All packages must have the same name so only - // the version can differ -> we could simply pick the package with the most - // recent version and optionally omit a warning (or even abort with an error). + // match the dependency specification (PackageName and PackageVersion). + // TODO: Support PackageVersionConstraint: All packages must have the same + // name so only the version can differ -> we could simply pick the package + // with the most recent version and optionally omit a warning (or even + // abort with an error). packs.into_iter().try_for_each(|p| { let _ = progress.as_ref().map(|p| p.tick()); @@ -186,11 +187,11 @@ impl Dag { ) -> Result<()> { for (package, idx) in mappings { get_package_dependencies(package, conditional_data) - .and_then_ok(|(dep_name, dep_constr, dep_kind)| { + .and_then_ok(|(dep_name, dep_version, dep_kind)| { mappings .iter() .filter(|(pkg, _)| { - *pkg.name() == dep_name && dep_constr.matches(pkg.version()) + *pkg.name() == dep_name && *pkg.version() == dep_version }) .try_for_each(|(dep, dep_idx)| { dag.add_edge(*idx, *dep_idx, dep_kind.clone()) diff --git a/src/package/dependency/build.rs b/src/package/dependency/build.rs index ecb05f01..1b3195ed 100644 --- a/src/package/dependency/build.rs +++ b/src/package/dependency/build.rs @@ -15,7 +15,7 @@ use serde::Serialize; use crate::package::dependency::condition::Condition; use crate::package::dependency::ParseDependency; use crate::package::PackageName; -use crate::package::PackageVersionConstraint; +use crate::package::PackageVersion; /// A dependency that is packaged and is only required during build time #[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)] @@ -35,7 +35,7 @@ impl AsRef for BuildDependency { } impl ParseDependency for BuildDependency { - fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersionConstraint)> { + fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersion)> { crate::package::dependency::parse_package_dependency_string_into_name_and_version( self.as_ref(), ) diff --git a/src/package/dependency/mod.rs b/src/package/dependency/mod.rs index 9527331c..87dbff5c 100644 --- a/src/package/dependency/mod.rs +++ b/src/package/dependency/mod.rs @@ -14,7 +14,7 @@ use lazy_static::lazy_static; use regex::Regex; use crate::package::PackageName; -use crate::package::PackageVersionConstraint; +use crate::package::PackageVersion; mod build; pub use build::*; @@ -25,7 +25,7 @@ pub use runtime::*; pub mod condition; pub trait ParseDependency { - fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersionConstraint)>; + fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersion)>; } lazy_static! { @@ -43,12 +43,12 @@ lazy_static! { /// TODO: Reimplement using pom crate pub(in crate::package::dependency) fn parse_package_dependency_string_into_name_and_version( s: &str, -) -> Result<(PackageName, PackageVersionConstraint)> { +) -> Result<(PackageName, PackageVersion)> { let caps = crate::package::dependency::DEPENDENCY_PARSING_RE .captures(s) .ok_or_else(|| { anyhow!( - "Could not parse into package name and package version constraint: '{}'", + "Could not parse into package name and package version: '{}'", s ) })?; @@ -63,13 +63,14 @@ pub(in crate::package::dependency) fn parse_package_dependency_string_into_name_ .map(|m| String::from(m.as_str())) .ok_or_else(|| anyhow!("Could not parse version: '{}'", s))?; - let v = PackageVersionConstraint::try_from(vers).map_err(|e| { + // TODO: This is here temporarily to keep the version validation: + let _ = crate::package::PackageVersionConstraint::try_from(vers.clone()).map_err(|e| { e.context(anyhow!( "Could not parse the following package dependency string: {}", s )) })?; - Ok((PackageName::from(name), v)) + Ok((PackageName::from(name), PackageVersion::from(vers))) } #[cfg(test)] @@ -88,20 +89,17 @@ mod tests { let dependency_specification = format!("{name} ={version}"); let dep = Dependency::from(dependency_specification.clone()); - let (dep_name, dep_version_constraint) = dep.parse_as_name_and_version().unwrap(); + let (dep_name, dep_version) = dep.parse_as_name_and_version().unwrap(); - let version_constraint = PackageVersionConstraint::from_version( - String::from("="), - PackageVersion::from(version), - ); + let version = PackageVersion::from(version); assert_eq!( dep_name, PackageName::from(name), "Name check failed for input: {dependency_specification}" ); assert_eq!( - dep_version_constraint, version_constraint, - "Version constraint check failed for input: {dependency_specification}" + dep_version, version, + "Version check failed for input: {dependency_specification}" ); } @@ -139,20 +137,17 @@ mod tests { } #[test] - fn test_dependency_version_without_constraint() { + fn test_dependency_version_with_constraint() { let name = "foobar"; - let version_constraint = "1.42.37"; + let version_constraint = "=1.42.37"; let dep = Dependency::from(format!("{name} {version_constraint}")); - let (dep_name, dep_version_constraint) = dep.parse_as_name_and_version().unwrap(); + let (dep_name, dep_version) = dep.parse_as_name_and_version().unwrap(); assert_eq!(dep_name, PackageName::from(name.to_string())); assert_eq!( - dep_version_constraint, - PackageVersionConstraint::from_version( - String::from(""), - PackageVersion::from(version_constraint.to_string()), - ) + dep_version, + PackageVersion::from(version_constraint.to_string()), ); } diff --git a/src/package/dependency/runtime.rs b/src/package/dependency/runtime.rs index f0f80999..d8395448 100644 --- a/src/package/dependency/runtime.rs +++ b/src/package/dependency/runtime.rs @@ -15,7 +15,7 @@ use serde::Serialize; use crate::package::dependency::condition::Condition; use crate::package::dependency::ParseDependency; use crate::package::PackageName; -use crate::package::PackageVersionConstraint; +use crate::package::PackageVersion; /// A dependency that is packaged and is required during runtime #[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)] @@ -48,7 +48,7 @@ impl From for Dependency { } impl ParseDependency for Dependency { - fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersionConstraint)> { + fn parse_as_name_and_version(&self) -> Result<(PackageName, PackageVersion)> { crate::package::dependency::parse_package_dependency_string_into_name_and_version( self.as_ref(), ) diff --git a/src/package/version.rs b/src/package/version.rs index 7c187ffd..df7cba31 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -86,6 +86,7 @@ impl PackageVersionConstraint { } #[cfg(test)] + #[allow(unused)] pub fn from_version(constraint: String, version: PackageVersion) -> Self { PackageVersionConstraint { constraint, diff --git a/src/repository/repository.rs b/src/repository/repository.rs index eb3fc356..35bc71d4 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -25,7 +25,6 @@ use tracing::trace; use crate::package::Package; use crate::package::PackageName; use crate::package::PackageVersion; -use crate::package::PackageVersionConstraint; /// A repository represents a collection of packages pub struct Repository { @@ -258,11 +257,11 @@ impl Repository { pub fn find_with_version<'a>( &'a self, name: &PackageName, - vc: &PackageVersionConstraint, + version: &PackageVersion, ) -> Vec<&'a Package> { self.inner .iter() - .filter(|((n, v), _)| n == name && vc.matches(v)) + .filter(|((n, v), _)| n == name && v == version) .map(|(_, p)| p) .collect() } @@ -354,9 +353,9 @@ pub mod tests { let repo = Repository::from(btree); - let constraint = PackageVersionConstraint::from_version(String::from("="), pversion("2")); + let version = pversion("=2"); - let ps = repo.find_with_version(&pname("a"), &constraint); + let ps = repo.find_with_version(&pname("a"), &version); assert_eq!(ps.len(), 1); let p = ps.first().unwrap(); @@ -370,9 +369,8 @@ pub mod tests { use crate::package::Package; fn get_pkg(repo: &Repository, name: &str, version: &str) -> Package { - let constraint = - PackageVersionConstraint::from_version(String::from("="), pversion(version)); - let pkgs = repo.find_with_version(&pname(name), &constraint); + let version = pversion(version); + let pkgs = repo.find_with_version(&pname(name), &version); assert_eq!(pkgs.len(), 1, "Failed to find pkg: {name} ={version}"); (*pkgs.first().unwrap()).clone() } From 23dd0be4e529ca327fb2e34d6e2bdbec6c681624 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 9 Jan 2025 14:03:29 +0100 Subject: [PATCH 130/150] Resort to strict version matching for invalid PackageVersionConstraint If there isn't a constraint (only `=` is currently supported) and the version cannot be parsed as a SemVer (`VersionReq`), we'll automatically fall back to strict version matching (as if `=` was provided) in order to better support exotic versions. This is done to retain CLI compatibility with the old behaviour. Signed-off-by: Michael Weiss --- src/package/version.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/package/version.rs b/src/package/version.rs index df7cba31..6f260849 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -18,6 +18,7 @@ use pom::parser::Parser as PomParser; use regex::Regex; use serde::Deserialize; use serde::Serialize; +use tracing::info; use crate::util::parser::*; @@ -47,8 +48,15 @@ impl PackageVersionConstraint { .map_err(Error::from) } else { semver::VersionReq::parse(&(Self::get_default_constraint() + &version)) - .map(|_| ("".to_string(), version)) + .map(|_| ("".to_string(), version.clone())) .map_err(Error::from) + // TODO: Drop this (for backward compatibility, we temporarily fallback to + // the old behaviour (as if the constraint `=` was specified) if the + // provided version cannot be parsed by the semver crate - this is required + // for somewhat "exotic" versions like the old OpenSSL 1.1.1w, web browsers + // with a fourth version number, or (unstable) releases based on the date): + .inspect_err(|e| info!("Couldn't parse version \"{version}\" as SemVer ({e}) -> falling back to strict version matching (={version})")) + .map_or(Ok(("=".to_string(), version)), Ok) } }) .map(|(constraint, version)| PackageVersionConstraint { From 0451b6dcfd07857e09b3de339a8cce2c986a6f7b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 9 Jan 2025 20:58:46 +0100 Subject: [PATCH 131/150] Fix all clippy warnings (beta toolchain version 1.85.0-beta.1) The improved `useless_conversion` lint [0] found quite a few cases of unnecessary conversions (basically all `map_err(anyhow::Error::from)` calls except one unnecessary instance of `map(Vec::from)`). The pretty new `literal_string_with_formatting_args` lint [1] also got improved to discover a formatting string that we don't evaluate. This is a false positive though as we pass it to `indicatif::ProgressBars` as `bar_template` string. [0]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [1]: https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args Signed-off-by: Michael Weiss --- src/commands/db.rs | 16 ++++++++-------- src/commands/endpoint.rs | 1 - src/commands/release.rs | 1 - src/commands/source/download.rs | 3 +-- src/commands/util.rs | 2 -- src/config/util.rs | 3 +++ src/db/models/githash.rs | 1 - src/db/models/job.rs | 1 - src/db/models/submit.rs | 1 - src/endpoint/configured.rs | 13 +------------ src/endpoint/scheduler.rs | 4 +--- src/filestore/path.rs | 2 -- src/filestore/staging.rs | 2 -- src/package/script.rs | 17 +++++++---------- src/package/version.rs | 1 - src/repository/fs/representation.rs | 1 - src/source/mod.rs | 2 -- 17 files changed, 21 insertions(+), 50 deletions(-) diff --git a/src/commands/db.rs b/src/commands/db.rs index b21f5f4e..fc9cd54c 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -95,12 +95,12 @@ fn cli(db_connection_config: DbConnectionConfig<'_>, matches: &ArgMatches) -> Re info!("psql exited successfully"); Ok(()) } else { - Err(anyhow!("psql did not exit successfully")) - .with_context(|| match String::from_utf8(out.stderr) { + Err(anyhow!("psql did not exit successfully")).with_context(|| { + match String::from_utf8(out.stderr) { Ok(log) => anyhow!("{}", log), Err(e) => anyhow!("Cannot parse log into valid UTF-8: {}", e), - }) - .map_err(Error::from) + } + }) } }) } @@ -127,12 +127,12 @@ fn cli(db_connection_config: DbConnectionConfig<'_>, matches: &ArgMatches) -> Re info!("pgcli exited successfully"); Ok(()) } else { - Err(anyhow!("pgcli did not exit successfully")) - .with_context(|| match String::from_utf8(out.stderr) { + Err(anyhow!("pgcli did not exit successfully")).with_context(|| { + match String::from_utf8(out.stderr) { Ok(log) => anyhow!("{}", log), Err(e) => anyhow!("Cannot parse log into valid UTF-8: {}", e), - }) - .map_err(Error::from) + } + }) } }) } diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index aebb7ea3..e6705183 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -385,7 +385,6 @@ async fn containers_top( .top(None) .await .with_context(|| anyhow!("Fetching 'top' for {}", stat.id)) - .map_err(Error::from) .map(|top| (stat.id, top)) }) .collect::>() diff --git a/src/commands/release.rs b/src/commands/release.rs index 81664230..71c21d33 100644 --- a/src/commands/release.rs +++ b/src/commands/release.rs @@ -207,7 +207,6 @@ async fn new_release( .with_context(|| { anyhow!("Copying {} to {}", art_path.display(), dest_path.display()) }) - .map_err(Error::from) .and_then(|_| { debug!("Updating {:?} to set released = true", art); let rel = crate::db::models::Release::create( diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs index ea3176b5..5e60aa29 100644 --- a/src/commands/source/download.rs +++ b/src/commands/source/download.rs @@ -246,8 +246,7 @@ pub async fn download( "Cannot download source that is marked for manual download" )) .context(anyhow!("Creating source: {}", source.path().display())) - .context(anyhow!("Downloading source: {}", source.url())) - .map_err(Error::from); + .context(anyhow!("Downloading source: {}", source.url())); } if source_path_exists && !force { diff --git a/src/commands/util.rs b/src/commands/util.rs index e142da33..aee2bd7d 100644 --- a/src/commands/util.rs +++ b/src/commands/util.rs @@ -159,7 +159,6 @@ pub fn mk_package_name_regex(regex: &str) -> Result { builder .build() .with_context(|| anyhow!("Failed to build regex from '{}'", regex)) - .map_err(Error::from) } /// Make a header column for the ascii_table crate @@ -259,7 +258,6 @@ pub fn get_date_filter( .checked_sub_signed(dur) .ok_or_else(|| anyhow!("Time calculation would overflow")) .with_context(|| anyhow!("Cannot subtract {} from 'now'", dur)) - .map_err(Error::from) }) .transpose() } diff --git a/src/config/util.rs b/src/config/util.rs index 99b1ba00..77922ed6 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -12,6 +12,9 @@ //! configuration and having to use default values. /// The default progress bar format +// Ignore a false positive Clippy warning (we pass this format string to +// `indicatif::ProgressBars` as `bar_template` instead of evaluating it here): +#[rustversion::attr(since(1.83), allow(clippy::literal_string_with_formatting_args))] pub fn default_progress_format() -> String { String::from("{elapsed_precise} {percent:>3}% {bar:5.cyan/blue} | {msg}") } diff --git a/src/db/models/githash.rs b/src/db/models/githash.rs index 8ea40093..5b1bbe0e 100644 --- a/src/db/models/githash.rs +++ b/src/db/models/githash.rs @@ -53,6 +53,5 @@ impl GitHash { .find(git_hash_id) .first::<_>(database_connection) .context("Loading GitHash") - .map_err(Error::from) } } diff --git a/src/db/models/job.rs b/src/db/models/job.rs index e311d17d..895d9573 100644 --- a/src/db/models/job.rs +++ b/src/db/models/job.rs @@ -92,7 +92,6 @@ impl Job { .filter(uuid.eq(job_uuid)) .first::(conn) .with_context(|| format!("Finding created job in database: {job_uuid}")) - .map_err(Error::from) }) } diff --git a/src/db/models/submit.rs b/src/db/models/submit.rs index ef885bf5..82c899d9 100644 --- a/src/db/models/submit.rs +++ b/src/db/models/submit.rs @@ -80,6 +80,5 @@ impl Submit { .filter(submits::uuid.eq(submit_id)) .first::(database_connection) .context("Loading submit") - .map_err(Error::from) } } diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index 1d91e904..4927450c 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -123,7 +123,6 @@ impl Endpoint { crate::config::EndpointType::Http => shiplift::Uri::from_str(ep.uri()) .map(shiplift::Docker::host) .with_context(|| anyhow!("Connecting to {}", ep.uri())) - .map_err(Error::from) .map(|docker| { Endpoint::builder() .name(ep_name.clone()) @@ -596,7 +595,6 @@ impl<'a> PreparedContainer<'a> { container.id() ) }) - .map_err(Error::from) }) .collect::>() .collect::>() @@ -608,7 +606,6 @@ impl<'a> PreparedContainer<'a> { ) }) .with_context(|| anyhow!("Copying sources to container {}", container.id())) - .map_err(Error::from) } async fn copy_patches_to_container(container: &Container<'_>, job: &RunnableJob) -> Result<()> { @@ -655,15 +652,12 @@ impl<'a> PreparedContainer<'a> { container.id() ) }) - .map_err(Error::from) }) .collect::>() .collect::>() .await - .map_err(Error::from) .inspect(|_| trace!("Copied all patches")) .with_context(|| anyhow!("Copying patches to container {}", container.id())) - .map_err(Error::from) } async fn copy_artifacts_to_container( @@ -746,8 +740,7 @@ impl<'a> PreparedContainer<'a> { container.id(), destination.display() ) - }) - .map_err(Error::from); + }); drop(art); // ensure `art` is moved into closure r }); @@ -767,7 +760,6 @@ impl<'a> PreparedContainer<'a> { ) }) .with_context(|| anyhow!("Copying artifacts to container {}", container.id())) - .map_err(Error::from) .map(|_| ()) } @@ -778,7 +770,6 @@ impl<'a> PreparedContainer<'a> { .await .inspect(|_| trace!("Successfully copied script to container {}", container.id())) .with_context(|| anyhow!("Copying the script into container {}", container.id())) - .map_err(Error::from) } pub async fn start(self) -> Result> { @@ -877,7 +868,6 @@ impl<'a> StartedContainer<'a> { .with_context(|| anyhow!("Sending log to log sink")) .map(|_| exited_successfully) }) - .map_err(Error::from) }) .collect::>>() .map(|r| { @@ -964,7 +954,6 @@ impl ExecutedContainer<'_> { self.create_info.id ) }) - .map_err(Error::from) }); let mut writelock = staging_store.write().await; diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs index 74caaac4..11fc3b22 100644 --- a/src/endpoint/scheduler.rs +++ b/src/endpoint/scheduler.rs @@ -275,8 +275,7 @@ impl JobHandle { &endpoint_uri, &container_id, ) - }) - .map_err(Error::from); + }); if res.is_err() { trace!("Error was returned from script"); @@ -524,7 +523,6 @@ impl LogReceiver<'_> { .await .map(tokio::io::BufWriter::new) .with_context(|| anyhow!("Opening {}", path.display())) - .map_err(Error::from) }) } else { None diff --git a/src/filestore/path.rs b/src/filestore/path.rs index 44c5d183..866a4dfd 100644 --- a/src/filestore/path.rs +++ b/src/filestore/path.rs @@ -206,9 +206,7 @@ impl<'a> FullArtifactPath<'a> { pub async fn read(self) -> Result> { tokio::fs::read(self.joined()) .await - .map(Vec::from) .with_context(|| anyhow!("Reading artifact from path {}", self.0.display())) - .map_err(Error::from) } } diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs index ac3ee8a8..006afb56 100644 --- a/src/filestore/staging.rs +++ b/src/filestore/staging.rs @@ -12,7 +12,6 @@ use std::fmt::Debug; use anyhow::anyhow; use anyhow::Context; -use anyhow::Error; use anyhow::Result; use futures::stream::Stream; use indicatif::ProgressBar; @@ -54,7 +53,6 @@ impl StagingStore { trace!("Unpacking archive to {}", dest.display()); dest.unpack_archive_here(tar::Archive::new(&bytes[..])) .context("Unpacking TAR") - .map_err(Error::from) }) .context("Concatenating the output bytestream")? .into_iter() diff --git a/src/package/script.rs b/src/package/script.rs index 9375275d..8a93daea 100644 --- a/src/package/script.rs +++ b/src/package/script.rs @@ -15,7 +15,6 @@ use std::process::ExitStatus; use anyhow::anyhow; use anyhow::Context as AnyhowContext; -use anyhow::Error; use anyhow::Result; use handlebars::{ Context, Handlebars, Helper, HelperDef, HelperResult, JsonRender, Output, PathAndJson, @@ -247,15 +246,13 @@ impl<'a> ScriptBuilder<'a> { trace!("Rendering Package: {:?}", package.debug_details()); } - hb.render("script", package) - .with_context(|| { - anyhow!( - "Rendering script for package {} {} failed", - package.name(), - package.version() - ) - }) - .map_err(Error::from) + hb.render("script", package).with_context(|| { + anyhow!( + "Rendering script for package {} {} failed", + package.name(), + package.version() + ) + }) } } diff --git a/src/package/version.rs b/src/package/version.rs index 6f260849..b3413829 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -119,7 +119,6 @@ impl TryFrom<&str> for PackageVersionConstraint { .parse(s.as_bytes()) .context(anyhow!("Failed to parse the following package version constraint: {}", s)) .context("A package version constraint must have a version and an optional comparator (only `=` is currently supported, which is also the default), e.g.: =0.1.0") - .map_err(Error::from) } } diff --git a/src/repository/fs/representation.rs b/src/repository/fs/representation.rs index 344fb371..7bf05f5d 100644 --- a/src/repository/fs/representation.rs +++ b/src/repository/fs/representation.rs @@ -266,7 +266,6 @@ fn load_file(path: &Path) -> Result { trace!("Reading {}", path.display()); std::fs::read_to_string(path) .with_context(|| anyhow!("Reading file from filesystem: {}", path.display())) - .map_err(Error::from) } #[cfg(test)] diff --git a/src/source/mod.rs b/src/source/mod.rs index 8e1fa830..b16d46af 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -12,7 +12,6 @@ use std::path::PathBuf; use anyhow::anyhow; use anyhow::Context; -use anyhow::Error; use anyhow::Result; use tracing::trace; use url::Url; @@ -140,6 +139,5 @@ impl SourceEntry { .open(&p) .await .with_context(|| anyhow!("Creating file: {}", p.display())) - .map_err(Error::from) } } From 735c23fb3660c77dd7780d6c6e36853e0c3ad941 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:31:57 +0000 Subject: [PATCH 132/150] build(deps): bump petgraph from 0.6.6 to 0.7.1 Bumps [petgraph](https://github.com/petgraph/petgraph) from 0.6.6 to 0.7.1. - [Changelog](https://github.com/petgraph/petgraph/blob/master/RELEASES.rst) - [Commits](https://github.com/petgraph/petgraph/compare/petgraph@v0.6.6...petgraph@v0.7.1) --- updated-dependencies: - dependency-name: petgraph dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f1f53ee0..2712ebf5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1927,9 +1927,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.6" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94eb96835f05ec51384814c9b2daef83f68486f67a0e2e9680e0f698dca808e" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset", "indexmap", diff --git a/Cargo.toml b/Cargo.toml index 890349b9..0dda9d64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ indoc = "2" itertools = "0.14" lazy_static = "1" parse-display = "0.10" -petgraph = "0.6" +petgraph = "0.7" pom = "3" ptree = { version = "0.5", default-features = false } rand = "0.8" From 48c5a29340fa92cf7b5cbd10312887abd164e40d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 14 Jan 2025 15:40:53 +0100 Subject: [PATCH 133/150] Cleanup the old `.env` script with a DB URL for a local test DB This file was added in 3b33514 but isn't required anymore (was probably only relevant for the initial development - we don't use that local test DB anymore and this depends on the local test setup so it should be set by the user/developer). Signed-off-by: Michael Weiss --- .env | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index b1ec0a0d..00000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -DATABASE_URL=postgres://pgdev:password@localhost/butido From 0749173bcb9af87b247b68c430d13196961099a2 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 14 Jan 2025 16:08:51 +0100 Subject: [PATCH 134/150] Lowercase some words in the CLI help output for consistency These are the last case-related "inconsistencies" that I found. Signed-off-by: Michael Weiss --- src/cli.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 47f7a0a5..783e31b6 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -62,7 +62,7 @@ pub fn cli() -> Command { Command::new("butido") .author(crate_authors!()) .disable_version_flag(true) - .about("Generic Build Orchestration System for building Linux packages with Docker") + .about("Generic build orchestration system for building Linux packages with Docker") .after_help(indoc::indoc!(r#" The following environment variables can be passed to butido: @@ -246,7 +246,7 @@ pub fn cli() -> Command { .required(true) .index(1) .value_name("SUBMIT") - .help("The Submit to show details about") + .help("The submit to show details about") .value_parser(uuid::Uuid::parse_str) ) ) From 8d0de497e118e0600a054c4c2c1b27dcb777d95e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 14 Jan 2025 16:18:52 +0100 Subject: [PATCH 135/150] deny.toml: Drop an exception for the unmaintained `instant` crate I added this exception in 697cbdb to make CI happy/green but we can now remove it again since the last update of the `indicatif` crate in 5a64ec8. Signed-off-by: Michael Weiss --- deny.toml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/deny.toml b/deny.toml index 309d1536..1e64fb8f 100644 --- a/deny.toml +++ b/deny.toml @@ -65,11 +65,4 @@ ignore = [ # https://github.com/trishume/syntect/issues/537 is resolved (replace # yaml-rust with yaml-rust2): { id = "RUSTSEC-2024-0320", reason = "Only an informative advisory that the crate is unmaintained and the maintainer unreachable" }, - - # Ignore an "INFO Unmaintained" advisory for the instant crate - # that the "indicatif" crate uses. This can be removed once - # https://github.com/console-rs/indicatif/issues/665 is resolved - # (The dependency instant is no longer maintained - - # consider switching to web-time instead): - { id = "RUSTSEC-2024-0384", reason = "Only an informative advisory that the crate is unmaintained and the author recommends using the maintained web-time crate instead." }, ] From 21ccbc1a77b93ad411720d238b8ad2a33abbdc2e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 14 Jan 2025 16:42:19 +0100 Subject: [PATCH 136/150] Ensure fixed regular expressions are only compiled once This is already done for `DEPENDENCY_PARSING_RE` but was missing for `VERSION_REGEX` (to parse `PackageVersion` into `semver::Version`). It's an optional performance optimization since re-compiling regexes should be avoided [0] and, depending on the code path, we might try to convert many `PackageVersion`s. [0]: https://docs.rs/regex/1.11.1/regex/index.html#avoid-re-compiling-regexes-especially-in-a-loop Signed-off-by: Michael Weiss --- Cargo.lock | 1 + Cargo.toml | 1 + src/package/version.rs | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2712ebf5..6995592e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,6 +236,7 @@ dependencies = [ "indoc", "itertools 0.14.0", "lazy_static", + "once_cell", "parse-display", "petgraph", "pom", diff --git a/Cargo.toml b/Cargo.toml index 0dda9d64..eeb76c5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,7 @@ indicatif = "0.17" indoc = "2" itertools = "0.14" lazy_static = "1" +once_cell = "1" parse-display = "0.10" petgraph = "0.7" pom = "3" diff --git a/src/package/version.rs b/src/package/version.rs index b3413829..d04a6423 100644 --- a/src/package/version.rs +++ b/src/package/version.rs @@ -14,6 +14,7 @@ use anyhow::anyhow; use anyhow::Context; use anyhow::Error; use anyhow::Result; +use once_cell::sync::Lazy; use pom::parser::Parser as PomParser; use regex::Regex; use serde::Deserialize; @@ -170,7 +171,8 @@ impl TryInto for PackageVersion { // should be safe as long as the static regex guarantees the assumptions): fn try_into(self) -> Result { // Warning: This regex must remain compatible to the one in the PackageVersion::parser below!: - let version_regex = Regex::new("^(?:([[:digit:]]+)|[-_.]|[[:alpha:]]+)").unwrap(); + static VERSION_REGEX: Lazy = + Lazy::new(|| Regex::new("^(?:([[:digit:]]+)|[-_.]|[[:alpha:]]+)").unwrap()); // This regex is based on PackageVersion::parser() below. We use a capture group to extract // the numbers and the "(?:exp)" syntax is for a non-capturing group. If it matches we'll // have the entire match in \0 and if it's a number it'll be in \1. @@ -182,7 +184,7 @@ impl TryInto for PackageVersion { // This loop is dangerous... Ensure that the match gets removed from version_str in every // iteration to avoid an endless loop! - while let Some(captures) = version_regex.captures(version_str) { + while let Some(captures) = VERSION_REGEX.captures(version_str) { // For debugging: println!("{:?}", captures); let match_str = captures.get(0).unwrap().as_str(); // Unwrap safe as \0 always exists @@ -212,7 +214,7 @@ impl TryInto for PackageVersion { .with_context(|| { anyhow!( "The regex \"{}\" for parsing the PackageVersion didn't match", - version_regex + Lazy::force(&VERSION_REGEX) ) }) .with_context(|| { From bd607c40ffa72d4cfd41a397364388d296f8756a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 14 Jan 2025 17:08:56 +0100 Subject: [PATCH 137/150] Cleanup the exception for allowing unstable name collisions This used to be required in the past for the `result-inspect` crate (s. 0b757ac) but the `Result::inspect()` API was stabilized in Rust version 1.76.0 [0] and we could drop that crate in 786404d. [0]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.inspect Signed-off-by: Michael Weiss --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index fee81c24..031ab516 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,7 +41,6 @@ while_true )] #![allow(macro_use_extern_crate)] -#![allow(unstable_name_collisions)] // TODO: Remove me with the next rustc update (probably) #[macro_use] extern crate diesel; From e1a4eb76e9be34dfd0fc0e2541cccad51f26f0dd Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 14 Jan 2025 17:20:55 +0100 Subject: [PATCH 138/150] Cleanup an exception for the Clippy `format_push_string` lint This was added in a54efe7 but currently isn't required anymore so let's drop it again. Signed-off-by: Michael Weiss --- src/package/script.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/package/script.rs b/src/package/script.rs index 8a93daea..b5dd8fe0 100644 --- a/src/package/script.rs +++ b/src/package/script.rs @@ -8,9 +8,6 @@ // SPDX-License-Identifier: EPL-2.0 // -// TODO: Is this really necessary? -#![allow(clippy::format_push_string)] - use std::process::ExitStatus; use anyhow::anyhow; From 33dd23a6ad29df0d4521446a823fbe11d2a2bf71 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 15 Jan 2025 19:19:54 +0100 Subject: [PATCH 139/150] Fix the minimum Rust version for a Clippy lint exception I've added this in 0451b6d but the "Added in [Rust version]" information on the website [0] was wrong [1] (I was already suspicious as our Rust beta CI check only recently hit this but didn't bother to look into it until I got an unknown lint warning locally). [0]: https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args [1]: https://github.com/rust-lang/rust-clippy/commit/db4aac6d21b0827aa0401b8ac31b34a9cf859f30 Signed-off-by: Michael Weiss --- src/config/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/util.rs b/src/config/util.rs index 77922ed6..3c51c869 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -14,7 +14,7 @@ /// The default progress bar format // Ignore a false positive Clippy warning (we pass this format string to // `indicatif::ProgressBars` as `bar_template` instead of evaluating it here): -#[rustversion::attr(since(1.83), allow(clippy::literal_string_with_formatting_args))] +#[rustversion::attr(since(1.85), allow(clippy::literal_string_with_formatting_args))] pub fn default_progress_format() -> String { String::from("{elapsed_precise} {percent:>3}% {bar:5.cyan/blue} | {msg}") } From b70bca210b804498029e66ad7785d137254dd941 Mon Sep 17 00:00:00 2001 From: Nico Steinle Date: Thu, 29 Aug 2024 17:44:56 +0200 Subject: [PATCH 140/150] Cleanup running containers on the Control-C signal - Add the `signal` feature to `tokio` to interrupt and handle the Control-C signal in Butido. - Add Control-C signal handling into the `Orchestrator`. - Implement `Drop` on the `JobHandle` to ensure container cleanup. Fixes #409 Signed-off-by: Nico Steinle --- Cargo.lock | 1 + Cargo.toml | 3 +- src/endpoint/configured.rs | 1 + src/endpoint/scheduler.rs | 46 +++++++++++-- src/job/runnable.rs | 2 +- src/orchestrator/orchestrator.rs | 108 +++++++++++++++++++------------ 6 files changed, 113 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6995592e..ecb301df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -259,6 +259,7 @@ dependencies = [ "terminal_size", "tokio", "tokio-stream", + "tokio-util", "toml", "tracing", "tracing-chrome", diff --git a/Cargo.toml b/Cargo.toml index eeb76c5e..af1c868f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,8 @@ shiplift = "0.7" syntect = "5" tar = "0.4" terminal_size = "0.4" -tokio = { version = "1", features = ["macros", "fs", "process", "io-util", "time"] } +tokio = { version = "1", features = ["macros", "fs", "process", "io-util", "signal", "time"] } +tokio-util = "0.7" tokio-stream = "0.1" toml = "0.8" tracing = "0.1" diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index 4927450c..92c347da 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -396,6 +396,7 @@ impl From for Image { } } +#[derive(Clone)] pub struct EndpointHandle(Arc); impl EndpointHandle { diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs index 11fc3b22..52514dfe 100644 --- a/src/endpoint/scheduler.rs +++ b/src/endpoint/scheduler.rs @@ -25,7 +25,7 @@ use itertools::Itertools; use tokio::io::AsyncWriteExt; use tokio::sync::mpsc::UnboundedReceiver; use tokio::sync::RwLock; -use tracing::trace; +use tracing::{debug, error, info, trace}; use uuid::Uuid; use crate::db::models as dbmodels; @@ -95,6 +95,7 @@ impl EndpointScheduler { log_dir: self.log_dir.clone(), bar, endpoint, + container_id: None, max_endpoint_name_length: self.max_endpoint_name_length, job, staging_store: self.staging_store.clone(), @@ -136,9 +137,11 @@ impl EndpointScheduler { } } +#[derive(Clone)] pub struct JobHandle { log_dir: Option, endpoint: EndpointHandle, + container_id: Option, max_endpoint_name_length: usize, job: RunnableJob, bar: ProgressBar, @@ -155,7 +158,7 @@ impl std::fmt::Debug for JobHandle { } impl JobHandle { - pub async fn run(self) -> Result>> { + pub async fn run(mut self) -> Result>> { let (log_sender, log_receiver) = tokio::sync::mpsc::unbounded_channel::(); let endpoint_uri = self.endpoint.uri().clone(); let endpoint_name = self.endpoint.name().clone(); @@ -181,6 +184,7 @@ impl JobHandle { ) .await?; let container_id = prepared_container.create_info().id.clone(); + self.container_id = Some(container_id.clone()); let running_container = prepared_container .start() .await @@ -202,12 +206,11 @@ impl JobHandle { package_name: &package.name, package_version: &package.version, log_dir: self.log_dir.as_ref(), - job: self.job, + job: &self.job, log_receiver, bar: self.bar.clone(), } .join(); - drop(self.bar); let (run_container, logres) = tokio::join!(running_container, logres); let log = @@ -369,6 +372,39 @@ impl JobHandle { } } +impl Drop for JobHandle { + fn drop(&mut self) { + if let Some(container_id) = self.container_id.clone() { + debug!("Cleaning up JobHandle with job UUID: {}", self.job.uuid()); + let docker = self.endpoint.docker().clone(); + + tokio::spawn(async move { + let container = docker.containers().get(&container_id); + debug!("Killing container with ID: {container_id}"); + + let container_info = container.inspect().await.unwrap(); + if container_info.state.running { + // We are killing the container here, since stopping the container can take ages + // and wouldn't bring any benefit here + match container.kill(None).await { + Ok(_) => info!("Killed container with ID: {}", container_id), + Err(e) => { + error!( + "Failed to stop container with ID: {}\nError: {}", + container_id, e + ) + } + } + } else { + debug!("Container with ID {} isn't running anymore", container_id); + } + }); + } else { + debug!("No container ID set, skipping cleanup"); + } + } +} + struct LogReceiver<'a> { endpoint_name: &'a str, max_endpoint_name_length: &'a usize, @@ -376,7 +412,7 @@ struct LogReceiver<'a> { package_name: &'a str, package_version: &'a str, log_dir: Option<&'a PathBuf>, - job: RunnableJob, + job: &'a RunnableJob, log_receiver: UnboundedReceiver, bar: ProgressBar, } diff --git a/src/job/runnable.rs b/src/job/runnable.rs index de06da4c..6adf38b6 100644 --- a/src/job/runnable.rs +++ b/src/job/runnable.rs @@ -28,7 +28,7 @@ use crate::util::docker::ImageName; use crate::util::EnvironmentVariableName; /// A job configuration that can be run. All inputs are clear here. -#[derive(Debug, Getters)] +#[derive(Clone, Debug, Getters)] pub struct RunnableJob { #[getset(get = "pub")] uuid: Uuid, diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index b4e0f1dc..5c2e959c 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -13,6 +13,7 @@ use std::borrow::Borrow; use std::collections::HashMap; use std::path::PathBuf; +use std::process::ExitCode; use std::sync::Arc; use std::sync::Mutex; @@ -32,8 +33,9 @@ use tokio::sync::mpsc::Receiver; use tokio::sync::mpsc::Sender; use tokio::sync::RwLock; use tokio_stream::StreamExt; +use tokio_util::sync::CancellationToken; use tracing::Instrument; -use tracing::{debug, error, trace}; +use tracing::{debug, error, info, trace}; use typed_builder::TypedBuilder; use uuid::Uuid; @@ -265,12 +267,26 @@ impl Borrow for ProducedArtifact { impl Orchestrator<'_> { pub async fn run(self, output: &mut Vec) -> Result> { - let (results, errors) = self.run_tree().await?; + let cancellation_token = CancellationToken::new(); + let controlc_cancellation_token = cancellation_token.clone(); + + tokio::spawn(async move { + tokio::signal::ctrl_c().await.unwrap(); + info!("Received the Ctrl-c signal, stopping..."); + controlc_cancellation_token.cancel(); + ExitCode::from(1) + }); + + let (results, errors) = self.run_tree(cancellation_token).await?; + output.extend(results); Ok(errors) } - async fn run_tree(self) -> Result<(Vec, HashMap)> { + async fn run_tree( + self, + token: CancellationToken, + ) -> Result<(Vec, HashMap)> { let prepare_span = tracing::debug_span!("run tree preparation"); // There is no async code until we drop this guard, so this is fine @@ -452,45 +468,55 @@ impl Orchestrator<'_> { // The JobTask::run implementation handles the rest, we just have to wait for all futures // to succeed. let run_span = tracing::debug_span!("run"); - let running_jobs = jobs - .into_iter() - .map(|prep| { - trace!(parent: &run_span, job_uuid = %prep.1.jobdef.job.uuid(), "Creating JobTask"); - // the sender is set or we need to use the root sender - let sender = prep - .3 - .into_inner() - .unwrap_or_else(|| vec![root_sender.clone()]); - JobTask::new(prep.0, prep.1, sender) - }) - .inspect( - |task| trace!(parent: &run_span, job_uuid = %task.jobdef.job.uuid(), "Running job"), - ) - .map(|task| { - task.run() - .instrument(tracing::debug_span!(parent: &run_span, "JobTask::run")) - }) - .collect::>(); - debug!("Built {} jobs", running_jobs.len()); - - running_jobs - .collect::>() - .instrument(run_span.clone()) - .await?; - trace!(parent: &run_span, "All jobs finished"); - drop(run_span); - - match root_receiver.recv().await { - None => Err(anyhow!("No result received...")), - Some(Ok(results)) => { - let results = results - .into_iter() - .flat_map(|tpl| tpl.1.into_iter()) - .map(ProducedArtifact::unpack) - .collect(); - Ok((results, HashMap::with_capacity(0))) + + tokio::select! { + _ = token.cancelled() => { + anyhow::bail!("Received Control-C signal"); + } + r = async { + let running_jobs = jobs + .into_iter() + .map(|prep| { + trace!(parent: &run_span, job_uuid = %prep.1.jobdef.job.uuid(), "Creating JobTask"); + // the sender is set or we need to use the root sender + let sender = prep + .3 + .into_inner() + .unwrap_or_else(|| vec![root_sender.clone()]); + JobTask::new(prep.0, prep.1, sender) + }) + .inspect( + |task| trace!(parent: &run_span, job_uuid = %task.jobdef.job.uuid(), "Running job"), + ) + .map(|task| { + task.run() + .instrument(tracing::debug_span!(parent: &run_span, "JobTask::run")) + }) + .collect::>(); + debug!("Built {} jobs", running_jobs.len()); + + running_jobs + .collect::>() + .instrument(run_span.clone()) + .await?; + trace!(parent: &run_span, "All jobs finished"); + drop(run_span); + + match root_receiver.recv().await { + None => Err(anyhow!("No result received...")), + Some(Ok(results)) => { + let results = results + .into_iter() + .flat_map(|tpl| tpl.1.into_iter()) + .map(ProducedArtifact::unpack) + .collect(); + Ok((results, HashMap::with_capacity(0))) + } + Some(Err(errors)) => Ok((vec![], errors)), + } + } => { + r } - Some(Err(errors)) => Ok((vec![], errors)), } } } From 26675e4f6e23e4e583ddb877f65bd8c62ec666a0 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 30 Jan 2025 19:53:08 +0100 Subject: [PATCH 141/150] Update all dependencies (Cargo.lock) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). Signed-off-by: Michael Weiss --- Cargo.lock | 402 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 235 insertions(+), 167 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ecb301df..f6f927f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -82,11 +82,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", + "once_cell", "windows-sys 0.59.0", ] @@ -107,7 +108,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -177,9 +178,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "block-buffer" @@ -192,9 +193,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.1" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", "regex-automata 0.4.9", @@ -203,9 +204,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "butido" @@ -332,9 +333,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.6" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" dependencies = [ "jobserver", "libc", @@ -364,18 +365,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.23" +version = "4.5.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" +checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.23" +version = "4.5.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" +checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" dependencies = [ "anstream", "anstyle", @@ -385,9 +386,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.40" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9" +checksum = "375f9d8255adeeedd51053574fd8d4ba875ea5fa558e86617b07f09f1680c8b6" dependencies = [ "clap", ] @@ -416,9 +417,9 @@ dependencies = [ [[package]] name = "config" -version = "0.15.4" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d84f8d224ac58107d53d3ec2b9ad39fd8c8c4e285d3c9cb35485ffd2ca88cb3" +checksum = "e329294a796e9b22329669c1f433a746983f9e324e07f4ef135be81bb2262de4" dependencies = [ "pathdiff", "serde", @@ -457,9 +458,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -550,7 +551,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -561,7 +562,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -573,6 +574,37 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn 2.0.96", +] + [[package]] name = "dialoguer" version = "0.11.0" @@ -592,7 +624,7 @@ version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf1bedf64cdb9643204a36dd15b19a6ce8e7aa7f7b105868e9f1fad5ffa7d12" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "chrono", "diesel_derives", @@ -613,7 +645,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -633,7 +665,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -654,7 +686,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -668,7 +700,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -840,7 +872,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -903,19 +935,31 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets", ] [[package]] name = "getset" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f636605b743120a8d32ed92fc27b6cde1a769f8f936c065151eb66f88ded513c" +checksum = "eded738faa0e88d3abc9d1a13cb11adc2073c400969eeb8793cf7132589959fc" dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -930,7 +974,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", "libgit2-sys", "log", @@ -966,24 +1010,25 @@ dependencies = [ [[package]] name = "handlebars" -version = "6.2.0" +version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4ccde012831f9a071a637b0d4e31df31c0f6c525784b35ae76a9ac6bc1e315" +checksum = "3d6b224b95c1e668ac0270325ad563b2eef1469fbbb8959bc7c692c844b813d9" dependencies = [ + "derive_builder", "log", "num-order", "pest", "pest_derive", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.11", ] [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -1055,9 +1100,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -1112,9 +1157,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes 1.9.0", "futures-channel", @@ -1156,7 +1201,7 @@ checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http 1.2.0", - "hyper 1.5.2", + "hyper 1.6.0", "hyper-util", "rustls", "rustls-pki-types", @@ -1173,7 +1218,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes 1.9.0", "http-body-util", - "hyper 1.5.2", + "hyper 1.6.0", "hyper-util", "native-tls", "tokio", @@ -1192,7 +1237,7 @@ dependencies = [ "futures-util", "http 1.2.0", "http-body 1.0.1", - "hyper 1.5.2", + "hyper 1.6.0", "pin-project-lite", "socket2", "tokio", @@ -1209,7 +1254,7 @@ dependencies = [ "futures-util", "hex", "hyper 0.14.32", - "pin-project 1.1.7", + "pin-project 1.1.8", "tokio", ] @@ -1351,7 +1396,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -1402,9 +1447,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown", @@ -1412,9 +1457,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.9" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ "console", "number_prefix", @@ -1431,9 +1476,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "ipnet" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is_terminal_polyfill" @@ -1476,9 +1521,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", @@ -1516,7 +1561,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", "redox_syscall", ] @@ -1537,9 +1582,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" dependencies = [ "cc", "libc", @@ -1564,9 +1609,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" @@ -1586,9 +1631,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "matchers" @@ -1634,9 +1679,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", ] @@ -1648,15 +1693,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" dependencies = [ "libc", "log", @@ -1763,11 +1808,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "foreign-types", "libc", @@ -1784,14 +1829,14 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" @@ -1807,9 +1852,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.9.1" +version = "3.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb6651f4be5e39563c4fe5cc8326349eb99a25d805a3493f791d5bfd0269e430" +checksum = "6e6520c8cc998c5741ee68ec1dc369fc47e5f0ea5320018ecf2a1ccd6328f48b" dependencies = [ "log", "serde", @@ -1867,7 +1912,7 @@ dependencies = [ "regex", "regex-syntax 0.8.5", "structmeta", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -1889,7 +1934,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.9", + "thiserror 2.0.11", "ucd-trie", ] @@ -1913,7 +1958,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -1948,11 +1993,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ - "pin-project-internal 1.1.7", + "pin-project-internal 1.1.8", ] [[package]] @@ -1968,20 +2013,20 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -2066,14 +2111,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -2143,7 +2188,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -2172,7 +2217,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -2221,9 +2266,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe060fe50f524be480214aba758c71f99f90ee8c83c5a36b5e9e1d568eb4eb3" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes 1.9.0", @@ -2234,7 +2279,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", + "hyper 1.6.0", "hyper-rustls", "hyper-tls", "hyper-util", @@ -2279,7 +2324,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -2303,11 +2348,11 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.42" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", @@ -2316,9 +2361,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" dependencies = [ "once_cell", "rustls-pki-types", @@ -2338,9 +2383,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" [[package]] name = "rustls-webpki" @@ -2361,9 +2406,9 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "same-file" @@ -2404,7 +2449,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation", "core-foundation-sys", "libc", @@ -2413,9 +2458,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2423,9 +2468,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" dependencies = [ "serde", ] @@ -2447,14 +2492,14 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -2539,7 +2584,7 @@ dependencies = [ "log", "mime", "openssl", - "pin-project 1.1.7", + "pin-project 1.1.8", "serde", "serde_json", "tar", @@ -2614,7 +2659,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -2625,7 +2670,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -2647,9 +2692,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.93" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -2673,7 +2718,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -2704,7 +2749,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation", "system-configuration-sys", ] @@ -2732,12 +2777,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -2764,11 +2810,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.9" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl 2.0.9", + "thiserror-impl 2.0.11", ] [[package]] @@ -2779,18 +2825,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] name = "thiserror-impl" -version = "2.0.9" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -2848,9 +2894,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes 1.9.0", @@ -2865,13 +2911,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -3009,7 +3055,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -3085,7 +3131,7 @@ checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -3102,9 +3148,9 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-width" @@ -3156,19 +3202,19 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -3221,36 +3267,46 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.49" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", @@ -3261,9 +3317,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3271,22 +3327,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" @@ -3303,9 +3362,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -3487,9 +3546,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" dependencies = [ "memchr", ] @@ -3500,6 +3559,15 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -3514,9 +3582,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "xattr" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", "linux-raw-sys", @@ -3558,7 +3626,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", "synstructure", ] @@ -3580,7 +3648,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] [[package]] @@ -3600,7 +3668,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", "synstructure", ] @@ -3629,5 +3697,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.96", ] From bd2862827a936f2ca77fa89de5aa6e2638913b0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:48:52 +0000 Subject: [PATCH 142/150] build(deps): bump git2 from 0.19.0 to 0.20.0 Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.19.0 to 0.20.0. - [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.19.0...git2-0.20.0) --- updated-dependencies: - dependency-name: git2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6f927f1..46a6d8b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -970,9 +970,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "git2" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" dependencies = [ "bitflags 2.8.0", "libc", @@ -1543,9 +1543,9 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libgit2-sys" -version = "0.17.0+1.8.1" +version = "0.18.0+1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index af1c868f..414d0594 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ diesel_migrations = "2" filters = "0.4" futures = "0.3" getset = "0.1" -git2 = "0.19" +git2 = "0.20" handlebars = { version = "6", features = ["no_logging"] } human-panic = "2" humantime = "2" From c43a45bb432bc705c78b3f64dcc3f064c2a64acc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:49:11 +0000 Subject: [PATCH 143/150] build(deps): bump colored from 2.2.0 to 3.0.0 Bumps [colored](https://github.com/mackwic/colored) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/mackwic/colored/releases) - [Changelog](https://github.com/colored-rs/colored/blob/master/CHANGELOG.md) - [Commits](https://github.com/mackwic/colored/compare/v2.2.0...v3.0.0) --- updated-dependencies: - dependency-name: colored dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 5 ++--- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6f927f1..b137015a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -407,11 +407,10 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.2.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ - "lazy_static", "windows-sys 0.59.0", ] diff --git a/Cargo.toml b/Cargo.toml index af1c868f..7fa83912 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ bytesize = "1" chrono = "0.4" clap = { version = "4", features = ["cargo"] } clap_complete = "4" -colored = "2" +colored = "3" config = { version = "0.15", default-features = false, features = [ "toml" ] } csv = "1" dialoguer = "0.11" From 2198813a5e13555cb3a5adb48f7ee5a4437e1945 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 18:53:29 +0000 Subject: [PATCH 144/150] build(deps): bump openssl from 0.10.69 to 0.10.70 Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.69 to 0.10.70. - [Release notes](https://github.com/sfackler/rust-openssl/releases) - [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70) --- updated-dependencies: - dependency-name: openssl dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6f927f1..76aa991d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1808,9 +1808,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.69" +version = "0.10.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e" +checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" dependencies = [ "bitflags 2.8.0", "cfg-if", @@ -1840,9 +1840,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" dependencies = [ "cc", "libc", From 159e18481e53ba4d724efbd72d0a26b6b7ec665c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:49:23 +0000 Subject: [PATCH 145/150] build(deps): bump rand from 0.8.5 to 0.9.0 Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.0. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.8.5...0.9.0) --- updated-dependencies: - dependency-name: rand dependency-type: direct:production update-type: version-update:semver-minor ... The function `rand::thread_rng()` got renamed to `rand::rng()`: https://github.com/rust-random/rand/pull/1506 Signed-off-by: dependabot[bot] Co-authored-by: Michael Weiss --- Cargo.lock | 41 +++++++++++++++++++++++++++++++---------- Cargo.toml | 2 +- src/commands/build.rs | 2 +- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6f927f1..77b90f81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2080,7 +2080,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -2163,20 +2163,20 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ - "libc", "rand_chacha", "rand_core", + "zerocopy 0.8.14", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", "rand_core", @@ -2184,11 +2184,12 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.3.1", + "zerocopy 0.8.14", ] [[package]] @@ -3637,7 +3638,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +dependencies = [ + "zerocopy-derive 0.8.14", ] [[package]] @@ -3651,6 +3661,17 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "zerocopy-derive" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + [[package]] name = "zerofrom" version = "0.1.5" diff --git a/Cargo.toml b/Cargo.toml index af1c868f..32cca0c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ parse-display = "0.10" petgraph = "0.7" pom = "3" ptree = { version = "0.5", default-features = false } -rand = "0.8" +rand = "0.9" rayon = "1" regex = "1" reqwest = { version = "0.12", features = [ "stream" ] } diff --git a/src/commands/build.rs b/src/commands/build.rs index c0958ab8..61348895 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -120,7 +120,7 @@ pub async fn build( // Because we're loading always sequentially, to have a bit more spread over the endpoints, // shuffle the endpoints here. Not a perfect solution, but a working one. use rand::seq::SliceRandom; - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); endpoint_configurations.shuffle(&mut rng); } info!("Endpoint config build"); From 354db2a04f068797b79d94081e9dfe6de9921818 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 27 Feb 2025 14:46:40 +0100 Subject: [PATCH 146/150] Replace return Err(anyhow!()) with anyhow::bail!() Signed-off-by: Matthias Beyer --- src/repository/repository.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/repository/repository.rs b/src/repository/repository.rs index ed5b94b4..d3ee0f15 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -45,10 +45,10 @@ pub fn normalize_relative_path(path: PathBuf) -> Result { Component::Prefix(_) => { // "A Windows path prefix, e.g., C: or \\server\share." // "Does not occur on Unix." - return Err(anyhow!( + anyhow::bail!( "The relative path \"{}\" starts with a Windows path prefix", path.display() - )); + ) } Component::RootDir => { // "The root directory component, appears after any prefix and before anything else. @@ -71,10 +71,10 @@ pub fn normalize_relative_path(path: PathBuf) -> Result { Component::ParentDir => { // "A reference to the parent directory, i.e., `..`." if !normalized_path.pop() { - return Err(anyhow!( + anyhow::bail!( "The relative path \"{}\" uses `..` to escape the base directory", path.display() - )); + ) } } Component::Normal(component) => { @@ -250,9 +250,9 @@ impl Repository { match (pname, pvers, matching_regexp) { (Some(pname), None, None) => return Err(anyhow!("{} not found", pname)), (Some(pname), Some(vers), None) => { - return Err(anyhow!("{} {} not found", pname, vers)) + anyhow::bail!("{} {} not found", pname, vers) } - (None, None, Some(regex)) => return Err(anyhow!("{} regex not found", regex)), + (None, None, Some(regex)) => anyhow::bail!("{} regex not found", regex), (_, _, _) => { panic!("This should not be possible, either we select packages by name and (optionally) version, or by regex.") From 47d44cb3f79962575959716e4bfbf32af6936c41 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 27 Feb 2025 14:47:01 +0100 Subject: [PATCH 147/150] Construct error values only if necessary Signed-off-by: Matthias Beyer --- src/repository/repository.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/repository/repository.rs b/src/repository/repository.rs index d3ee0f15..1f8fef85 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -149,19 +149,19 @@ impl Repository { "Bug: Could not get the \"patches\" value for: {}", path.display() ))?; - let first_patch_value = patches.first().ok_or(anyhow!( + let first_patch_value = patches.first().ok_or_else(|| anyhow!( "Bug: Could not get the first \"patches\" entry for: {}", path.display() ))?; // Get the origin (path to the `pkg.toml` file) for the "patches" // setting (it must currently be the same for all array entries): - let origin_path = first_patch_value.origin().map(PathBuf::from).ok_or(anyhow!( + let origin_path = first_patch_value.origin().map(PathBuf::from).ok_or_else(|| anyhow!( "Bug: Could not get the origin of the first \"patches\" entry for: {}", path.display() ))?; // Note: `parent()` only "Returns None if the path terminates in a root // or prefix, or if it’s the empty string." so this should never happen: - let origin_dir_path = origin_path.parent().ok_or(anyhow!( + let origin_dir_path = origin_path.parent().ok_or_else(|| anyhow!( "Bug: Could not get the origin's parent of the first \"patches\" entry for: {}", path.display() ))?; From 93c73128fa69732d973c7eec3f3095f41b637f05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:54:07 +0000 Subject: [PATCH 148/150] build(deps): bump bytesize from 1.3.0 to 2.0.1 Bumps [bytesize](https://github.com/bytesize-rs/bytesize) from 1.3.0 to 2.0.1. - [Release notes](https://github.com/bytesize-rs/bytesize/releases) - [Changelog](https://github.com/bytesize-rs/bytesize/blob/master/CHANGELOG.md) - [Commits](https://github.com/bytesize-rs/bytesize/compare/v1.3.0...bytesize-v2.0.1) --- updated-dependencies: - dependency-name: bytesize dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a78f1603..2d39a543 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -295,9 +295,9 @@ checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "bytesize" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba" [[package]] name = "camino" diff --git a/Cargo.toml b/Cargo.toml index 7cc5f3e8..342c7896 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ maintenance = { status = "passively-maintained" } anyhow = "1" aquamarine = "0.6" ascii_table = { version = "4", features = ["color_codes", "wide_characters"] } -bytesize = "1" +bytesize = "2" chrono = "0.4" clap = { version = "4", features = ["cargo"] } clap_complete = "4" From c3c6e91b44532d0e0373c0ed8c69f7117c64d3ac Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 3 Mar 2025 13:33:58 +0100 Subject: [PATCH 149/150] Update all dependencies (Cargo.lock) and bump the MSRV (1.80 -> 1.85) This is simply the result of running `cargo update` without touching Cargo.toml (required since we currently only use dependabot to update direct dependencies and not indirect/transitive dependencies and useful to avoid a lot of dependabot PRs for minor/patch updates that can be bundled, like in this commit). The MSRV bump to 1.85 (currently the latest stable version) is required since at least the dependency `ascii_table-4.0.6` already switched to Rust edition 2024 which was stabilized in the 1.85 release [0]. It's a bit early for the bump but it's fine for us since we're not a library, our dependencies are already requiring it, and I already considered switching to the new Rust edition anyway. [0]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 Signed-off-by: Michael Weiss --- .github/workflows/cargo.yml | 8 +- Cargo.lock | 395 ++++++++++++++++++------------------ Cargo.toml | 2 +- README.md | 2 +- 4 files changed, 203 insertions(+), 204 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 21952713..21108a5f 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -14,7 +14,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@v1 with: - toolchain: 1.80.0 # MSRV + toolchain: 1.85.0 # MSRV components: rustfmt - name: Run cargo fmt @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.80.0 # MSRV + - 1.85.0 # MSRV - stable - beta @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.80.0 # MSRV + - 1.85.0 # MSRV - stable - beta steps: @@ -100,7 +100,7 @@ jobs: fail-fast: false matrix: include: - - rust: 1.80.0 # MSRV + - rust: 1.85.0 # MSRV optional: false - rust: beta optional: true diff --git a/Cargo.lock b/Cargo.lock index 2d39a543..fa9494cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "aquamarine" @@ -108,14 +108,14 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "ascii_table" -version = "4.0.5" +version = "4.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7e515f68a8667f957e85c7d59639fe1fa2e0b06c3c2394869b73a404e52ed" +checksum = "8bc070afe45e3d9e628b82d77d61c90531dc6997b341d57715b82461af415669" dependencies = [ "lazy_static", "regex", @@ -178,9 +178,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "block-buffer" @@ -289,9 +289,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "bytesize" @@ -333,9 +333,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.10" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "jobserver", "libc", @@ -350,9 +350,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", @@ -360,23 +360,23 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets", + "windows-link", ] [[package]] name = "clap" -version = "4.5.27" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.27" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" +checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" dependencies = [ "anstream", "anstyle", @@ -386,9 +386,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.44" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375f9d8255adeeedd51053574fd8d4ba875ea5fa558e86617b07f09f1680c8b6" +checksum = "f5c5508ea23c5366f77e53f5a0070e5a84e51687ec3ef9e0464c86dc8d13ce98" dependencies = [ "clap", ] @@ -416,9 +416,9 @@ dependencies = [ [[package]] name = "config" -version = "0.15.6" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e329294a796e9b22329669c1f433a746983f9e324e07f4ef135be81bb2262de4" +checksum = "8cf9dc8d4ef88e27a8cb23e85cb116403dedd57f7971964dc4b18ccead548901" dependencies = [ "pathdiff", "serde", @@ -428,9 +428,9 @@ dependencies = [ [[package]] name = "console" -version = "0.15.10" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ "encode_unicode", "libc", @@ -522,9 +522,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" dependencies = [ "memchr", ] @@ -550,7 +550,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -561,7 +561,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -591,7 +591,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -601,7 +601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -619,11 +619,11 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.6" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf1bedf64cdb9643204a36dd15b19a6ce8e7aa7f7b105868e9f1fad5ffa7d12" +checksum = "04001f23ba8843dc315804fa324000376084dfb1c30794ff68dd279e6e5696d5" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "byteorder", "chrono", "diesel_derives", @@ -644,7 +644,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -664,7 +664,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -685,28 +685,28 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "dsl_auto_type" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" +checksum = "139ae9aca7527f85f26dd76483eb38533fd84bd571065da1739656ef71c5ff5b" dependencies = [ "darling", "either", "heck", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "either" -version = "1.13.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d" [[package]] name = "encode_unicode" @@ -731,9 +731,9 @@ checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -777,9 +777,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.0.35" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" dependencies = [ "crc32fast", "miniz_oxide", @@ -871,7 +871,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -951,14 +951,14 @@ dependencies = [ [[package]] name = "getset" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded738faa0e88d3abc9d1a13cb11adc2073c400969eeb8793cf7132589959fc" +checksum = "f3586f256131df87204eb733da72e3d3eb4f343c639f4b7be279ac7c48baeafe" dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -973,7 +973,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "libc", "libgit2-sys", "log", @@ -990,12 +990,12 @@ checksum = "9525474359e360de19580a77590f3491c94d57b1ef2b8bd468877a83cbc7f4cb" [[package]] name = "h2" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" dependencies = [ "atomic-waker", - "bytes 1.9.0", + "bytes 1.10.0", "fnv", "futures-core", "futures-sink", @@ -1009,9 +1009,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "6.3.0" +version = "6.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6b224b95c1e668ac0270325ad563b2eef1469fbbb8959bc7c692c844b813d9" +checksum = "d752747ddabc4c1a70dd28e72f2e3c218a816773e0d7faf67433f1acfa6cba7c" dependencies = [ "derive_builder", "log", @@ -1020,7 +1020,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] @@ -1047,7 +1047,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "fnv", "itoa", ] @@ -1058,7 +1058,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "fnv", "itoa", ] @@ -1069,7 +1069,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "http 0.2.12", "pin-project-lite", ] @@ -1080,7 +1080,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "http 1.2.0", ] @@ -1090,7 +1090,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "futures-util", "http 1.2.0", "http-body 1.0.1", @@ -1137,7 +1137,7 @@ version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "futures-channel", "futures-core", "futures-util", @@ -1160,7 +1160,7 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "futures-channel", "futures-util", "h2", @@ -1215,7 +1215,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "http-body-util", "hyper 1.6.0", "hyper-util", @@ -1231,7 +1231,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "futures-channel", "futures-util", "http 1.2.0", @@ -1253,7 +1253,7 @@ dependencies = [ "futures-util", "hex", "hyper 0.14.32", - "pin-project 1.1.8", + "pin-project 1.1.9", "tokio", ] @@ -1395,7 +1395,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -1536,9 +1536,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.170" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" [[package]] name = "libgit2-sys" @@ -1560,16 +1560,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "libc", "redox_syscall", ] [[package]] name = "libssh2-sys" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" dependencies = [ "cc", "libc", @@ -1614,9 +1614,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "lock_api" @@ -1630,9 +1630,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "matchers" @@ -1678,9 +1678,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", ] @@ -1698,9 +1698,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", @@ -1779,9 +1779,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "onig" @@ -1807,11 +1807,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.70" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cfg-if", "foreign-types", "libc", @@ -1828,7 +1828,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -1839,9 +1839,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.105" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -1851,9 +1851,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.9.2" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e6520c8cc998c5741ee68ec1dc369fc47e5f0ea5320018ecf2a1ccd6328f48b" +checksum = "2a604e53c24761286860eba4e2c8b23a0161526476b1de520139d69cdb85a6b5" dependencies = [ "log", "serde", @@ -1911,7 +1911,7 @@ dependencies = [ "regex", "regex-syntax 0.8.5", "structmeta", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -1933,7 +1933,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.11", + "thiserror 2.0.12", "ucd-trie", ] @@ -1957,7 +1957,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -1992,11 +1992,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" dependencies = [ - "pin-project-internal 1.1.8", + "pin-project-internal 1.1.9", ] [[package]] @@ -2012,13 +2012,13 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -2035,9 +2035,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plist" @@ -2063,9 +2063,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" [[package]] name = "powerfmt" @@ -2084,10 +2084,11 @@ dependencies = [ [[package]] name = "pq-sys" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6cc05d7ea95200187117196eee9edd0644424911821aeb28a18ce60ea0b8793" +checksum = "30b51d65ebe1cb1f40641b15abae017fed35ccdda46e3dab1ff8768f625a3222" dependencies = [ + "libc", "vcpkg", ] @@ -2110,14 +2111,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -2142,9 +2143,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" dependencies = [ "proc-macro2", ] @@ -2168,7 +2169,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha", "rand_core", - "zerocopy 0.8.14", + "zerocopy 0.8.21", ] [[package]] @@ -2183,12 +2184,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ "getrandom 0.3.1", - "zerocopy 0.8.14", ] [[package]] @@ -2213,11 +2213,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -2271,7 +2271,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", - "bytes 1.9.0", + "bytes 1.10.0", "encoding_rs", "futures-core", "futures-util", @@ -2318,15 +2318,14 @@ checksum = "cbc95d56eb1865f69288945759cc0879d60ee68168dce676730275804ad2b276" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2352,7 +2351,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", @@ -2361,9 +2360,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.22" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "once_cell", "rustls-pki-types", @@ -2449,7 +2448,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation", "core-foundation-sys", "libc", @@ -2477,29 +2476,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "serde_json" -version = "1.0.138" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -2573,7 +2572,7 @@ checksum = "1e468265908f45299c26571dad9a2e5cb3656eceb51cd58f1441cf61aa71aad6" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.9.0", + "bytes 1.10.0", "chrono", "flate2", "futures-util", @@ -2584,7 +2583,7 @@ dependencies = [ "log", "mime", "openssl", - "pin-project 1.1.8", + "pin-project 1.1.9", "serde", "serde_json", "tar", @@ -2618,9 +2617,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" @@ -2632,12 +2631,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -2659,7 +2652,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -2670,7 +2663,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -2692,9 +2685,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" dependencies = [ "proc-macro2", "quote", @@ -2718,7 +2711,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -2749,7 +2742,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation", "system-configuration-sys", ] @@ -2766,9 +2759,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.43" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ "filetime", "libc", @@ -2777,9 +2770,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.16.0" +version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand", @@ -2810,11 +2803,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.11", + "thiserror-impl 2.0.12", ] [[package]] @@ -2825,18 +2818,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "thiserror-impl" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -2899,7 +2892,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", - "bytes 1.9.0", + "bytes 1.10.0", "libc", "mio", "pin-project-lite", @@ -2917,7 +2910,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -2943,9 +2936,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ "rustls", "tokio", @@ -2968,7 +2961,7 @@ version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ - "bytes 1.9.0", + "bytes 1.10.0", "futures-core", "futures-sink", "pin-project-lite", @@ -2977,9 +2970,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", @@ -2998,9 +2991,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap", "serde", @@ -3055,7 +3048,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] @@ -3131,14 +3124,14 @@ checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "ucd-trie" @@ -3148,9 +3141,9 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[package]] name = "unicode-width" @@ -3202,11 +3195,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.12.1" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" +checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.3.1", "serde", ] @@ -3298,7 +3291,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", "wasm-bindgen-shared", ] @@ -3333,7 +3326,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3382,9 +3375,9 @@ dependencies = [ [[package]] name = "which" -version = "7.0.1" +version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a9e33648339dc1642b0e36e21b3385e6148e289226f657c809dee59df5028" +checksum = "2774c861e1f072b3aadc02f8ba886c26ad6321567ecc294c935434cad06f1283" dependencies = [ "either", "env_home", @@ -3432,6 +3425,12 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-link" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + [[package]] name = "windows-registry" version = "0.2.0" @@ -3546,9 +3545,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.26" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" dependencies = [ "memchr", ] @@ -3565,7 +3564,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -3626,7 +3625,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", "synstructure", ] @@ -3642,11 +3641,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.14" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +checksum = "dcf01143b2dd5d134f11f545cf9f1431b13b749695cb33bcce051e7568f99478" dependencies = [ - "zerocopy-derive 0.8.14", + "zerocopy-derive 0.8.21", ] [[package]] @@ -3657,38 +3656,38 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "zerocopy-derive" -version = "0.8.14" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +checksum = "712c8386f4f4299382c9abee219bee7084f78fb939d88b6840fcc1320d5f6da2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", "synstructure", ] @@ -3717,5 +3716,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.99", ] diff --git a/Cargo.toml b/Cargo.toml index 342c7896..7074101e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ authors = [ "Michael Weiss ", # @primeos-work ] edition = "2021" -rust-version = "1.80.0" # MSRV +rust-version = "1.85.0" # MSRV license = "EPL-2.0" description = "Linux package tool utilizing Docker, PostgreSQL, and TOML" diff --git a/README.md b/README.md index b219a86d..895d298f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Building butido is easy, assuming you have a Rust installation: cargo build --release # (remove --release for a debug build) ``` -Butido is built and tested with Rust 1.80.0 as MSRV. +Butido is built and tested with Rust 1.85.0 as MSRV. ### (Development) Setup From a3b8b9d921bcb1d560a2e57d8fd38babe885bc5f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 3 Mar 2025 12:10:39 +0100 Subject: [PATCH 150/150] Switch to the `anyhow::bail!` macro where possible This does basically apply 354db2a to the whole codebase for consistency. The `anyhow::bail!` is basically syntactic sugar that is a bit more compact (tbh I'm a bit split on it as it also hides the `return` a bit but it's name is expressive enough and since we already make use of it we might as well also use it consistently everywhere where possible). Signed-off-by: Michael Weiss --- src/commands/build.rs | 12 ++++++------ src/commands/endpoint_container.rs | 5 +---- src/commands/release.rs | 23 ++++++++++------------- src/commands/util.rs | 8 ++++---- src/config/not_validated.rs | 12 ++++-------- src/main.rs | 4 ++-- src/package/dag.rs | 4 ++-- src/package/package.rs | 4 ++-- src/repository/repository.rs | 6 +++--- src/source/mod.rs | 5 +---- 10 files changed, 35 insertions(+), 48 deletions(-) diff --git a/src/commands/build.rs b/src/commands/build.rs index 61348895..2c5152f2 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -158,10 +158,10 @@ pub async fn build( // We only support building one package per call. // Everything else is invalid if packages.len() > 1 { - return Err(anyhow!( + anyhow::bail!( "Found multiple packages ({}). Cannot decide which one to build", packages.len() - )); + ); } let package = *packages .first() @@ -294,23 +294,23 @@ pub async fn build( .map(|pkg| { if let Some(allowlist) = pkg.allowed_images() { if !allowlist.contains(&image_name) { - return Err(anyhow!( + anyhow::bail!( "Package {} {} is only allowed on: {}", pkg.name(), pkg.version(), allowlist.iter().join(", ") - )); + ); } } if let Some(deniedlist) = pkg.denied_images() { if deniedlist.iter().any(|denied| image_name == *denied) { - return Err(anyhow!( + anyhow::bail!( "Package {} {} is not allowed to be built on {}", pkg.name(), pkg.version(), image_name - )); + ); } } diff --git a/src/commands/endpoint_container.rs b/src/commands/endpoint_container.rs index b8a0b702..79243365 100644 --- a/src/commands/endpoint_container.rs +++ b/src/commands/endpoint_container.rs @@ -45,10 +45,7 @@ pub async fn container( .collect::>(); if relevant_endpoints.len() > 1 { - return Err(anyhow!( - "Found more than one container for id {}", - container_id - )); + anyhow::bail!("Found more than one container for id {}", container_id); } let relevant_endpoint = relevant_endpoints diff --git a/src/commands/release.rs b/src/commands/release.rs index 71c21d33..d3e866c8 100644 --- a/src/commands/release.rs +++ b/src/commands/release.rs @@ -53,10 +53,10 @@ async fn new_release( let print_released_file_pathes = !matches.get_flag("quiet"); let release_store_name = matches.get_one::("release_store_name").unwrap(); // safe by clap if !(config.releases_directory().exists() && config.releases_directory().is_dir()) { - return Err(anyhow!( + anyhow::bail!( "Release directory does not exist or does not point to directory: {}", config.releases_directory().display() - )); + ); } let pname = matches.get_one::("package_name"); @@ -120,7 +120,7 @@ async fn new_release( debug!("Artifacts = {:?}", arts); if arts.is_empty() { - return Err(anyhow!("No matching artifacts found to release")); + anyhow::bail!("No matching artifacts found to release"); } arts.iter() @@ -169,7 +169,7 @@ async fn new_release( Err(anyhow!("Not a file: {}", art_path.display())) } else { if dest_path.exists() && !do_update { - return Err(anyhow!("Does already exist: {}", dest_path.display())); + anyhow::bail!("Does already exist: {}", dest_path.display()); } else if dest_path.exists() && do_update { writeln!( std::io::stderr(), @@ -181,10 +181,10 @@ async fn new_release( .with_prompt("Continue?") .interact()? { - return Err(anyhow!( + anyhow::bail!( "Does already exist: {} and update was denied", dest_path.display() - )); + ); } } @@ -250,16 +250,13 @@ pub async fn rm_release( ) -> Result<()> { let release_store_name = matches.get_one::("release_store_name").unwrap(); // safe by clap if !(config.releases_directory().exists() && config.releases_directory().is_dir()) { - return Err(anyhow!( + anyhow::bail!( "Release directory does not exist or does not point to directory: {}", config.releases_directory().display() - )); + ); } if !config.release_stores().contains(release_store_name) { - return Err(anyhow!( - "Unknown release store name: {}", - release_store_name - )); + anyhow::bail!("Unknown release store name: {}", release_store_name); } let pname = matches.get_one::("package_name").unwrap(); // safe by clap @@ -297,7 +294,7 @@ pub async fn rm_release( .join(release_store_name) .join(&artifact.path); if !artifact_path.is_file() { - return Err(anyhow!("Not a file: {}", artifact_path.display())); + anyhow::bail!("Not a file: {}", artifact_path.display()); } writeln!( diff --git a/src/commands/util.rs b/src/commands/util.rs index aee2bd7d..8d326a9d 100644 --- a/src/commands/util.rs +++ b/src/commands/util.rs @@ -126,24 +126,24 @@ fn all_phases_available(pkg: &Package, available_phases: &[PhaseName]) -> Result .iter() .find(|name| !available_phases.contains(name)) { - return Err(anyhow!( + anyhow::bail!( "Phase '{}' available in {} {}, but not in config", phase.as_str(), pkg.name(), pkg.version() - )); + ); } if let Some(phase) = available_phases .iter() .find(|name| !package_phasenames.contains(name)) { - return Err(anyhow!( + anyhow::bail!( "Phase '{}' not configured in {} {}", phase.as_str(), pkg.name(), pkg.version() - )); + ); } Ok(()) diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index d7d5375b..bceb312f 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -231,9 +231,7 @@ impl NotValidatedConfiguration { // Double-check the compatibility (mainly to avoid "error: field `compatibility` is never read") if self.compatibility != CONFIGURATION_VERSION { - return Err(anyhow!( - "The provided configuration is not compatible with this butido binary" - )); + anyhow::bail!("The provided configuration is not compatible with this butido binary"); } // Error if the configured directories are missing or no directories: @@ -243,14 +241,12 @@ impl NotValidatedConfiguration { check_directory_exists(&self.source_cache_root, "source_cache")?; if self.release_stores.is_empty() { - return Err(anyhow!( - "You need at least one release store in 'release_stores'" - )); + anyhow::bail!("You need at least one release store in 'release_stores'"); } // Error if there are no phases configured if self.available_phases.is_empty() { - return Err(anyhow!("No phases configured")); + anyhow::bail!("No phases configured"); } // Error if script highlighting theme is not valid @@ -269,7 +265,7 @@ impl NotValidatedConfiguration { .any(|allowed_theme| configured_theme == *allowed_theme); if !allowed_theme_present { - return Err(anyhow!("Theme not known: {}", configured_theme)); + anyhow::bail!("Theme not known: {}", configured_theme); } } diff --git a/src/main.rs b/src/main.rs index 031ab516..bba6a8b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -291,12 +291,12 @@ async fn main() -> Result<()> { Some((other, _)) => { error!("Unknown subcommand: {}", other); error!("Use --help to find available subcommands"); - return Err(anyhow!("Unknown subcommand: {}", other)); + anyhow::bail!("Unknown subcommand: {}", other); } None => { error!("No subcommand."); error!("Use --help to find available subcommands"); - return Err(anyhow!("No subcommand")); + anyhow::bail!("No subcommand"); } } diff --git a/src/package/dag.rs b/src/package/dag.rs index 10aca5fc..a1f5645b 100644 --- a/src/package/dag.rs +++ b/src/package/dag.rs @@ -139,13 +139,13 @@ impl Dag { packs ); if packs.is_empty() { - return Err(anyhow!( + anyhow::bail!( "Couldn't find the following dependency of {} {} in the repo: {} {}", p.name(), p.version(), name, version - )); + ); } // Check if we already created a DAG node for any of the matching packages and diff --git a/src/package/package.rs b/src/package/package.rs index 74d39411..13c73976 100644 --- a/src/package/package.rs +++ b/src/package/package.rs @@ -135,10 +135,10 @@ impl Package { } if path.is_absolute() { // The stripping of root_dir in the previous if branch didn't work: - return Err(anyhow!( + anyhow::bail!( "Bug: The path {} is absolute but it should be a relative path.", path.display() - )); + ); } else { *patch = normalize_relative_path(path)?; } diff --git a/src/repository/repository.rs b/src/repository/repository.rs index 1f8fef85..469c86fd 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -53,10 +53,10 @@ pub fn normalize_relative_path(path: PathBuf) -> Result { Component::RootDir => { // "The root directory component, appears after any prefix and before anything else. // It represents a separator that designates that a path starts from root." - return Err(anyhow!( + anyhow::bail!( "The relative path \"{}\" starts from the root directory", path.display() - )); + ); } Component::CurDir => { // "A reference to the current directory, i.e., `.`." @@ -248,7 +248,7 @@ impl Repository { // check if the iterator is empty if r.peek().is_none() { match (pname, pvers, matching_regexp) { - (Some(pname), None, None) => return Err(anyhow!("{} not found", pname)), + (Some(pname), None, None) => anyhow::bail!("{} not found", pname), (Some(pname), Some(vers), None) => { anyhow::bail!("{} {} not found", pname, vers) } diff --git a/src/source/mod.rs b/src/source/mod.rs index b16d46af..d9d002db 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -109,10 +109,7 @@ impl SourceEntry { if !self.cache_root.is_dir() { trace!("Cache root does not exist: {}", self.cache_root.display()); - return Err(anyhow!( - "Cache root {} does not exist!", - self.cache_root.display() - )); + anyhow::bail!("Cache root {} does not exist!", self.cache_root.display()); } {