From 53b5a1a5d5cf72fea00b40966e9aba3a8d5583eb Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 11:43:47 +0100 Subject: [PATCH 1/9] itertools: update to 0.14 --- ghostflow-cli/Cargo.toml | 2 +- ghostflow-github/Cargo.toml | 2 +- ghostflow-gitlab/Cargo.toml | 2 +- ghostflow/Cargo.toml | 2 +- ghostflow/src/actions/reformat.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ghostflow-cli/Cargo.toml b/ghostflow-cli/Cargo.toml index 68bc409b..27259ccd 100644 --- a/ghostflow-cli/Cargo.toml +++ b/ghostflow-cli/Cargo.toml @@ -23,7 +23,7 @@ git-checks-config = "^0.2.1" git-checks-core = "^1.2.2" git-checks = { version = "^4.2", features = ["config"] } git-workarea = "^4.2" -itertools = "~0.12" +itertools = "~0.14" log = "~0.4.4" rayon = "^1.0" serde = { version = "^1.0", features = ["derive"] } diff --git a/ghostflow-github/Cargo.toml b/ghostflow-github/Cargo.toml index 1409fa49..8694eb14 100644 --- a/ghostflow-github/Cargo.toml +++ b/ghostflow-github/Cargo.toml @@ -16,7 +16,7 @@ edition.workspace = true [dependencies] chrono = { version = "~0.4.16", default-features = false, features = ["serde"] } graphql_client = "~0.14" -itertools = "~0.12" +itertools = "~0.14" jsonwebtoken = "^9.0" log = "~0.4.4" reqwest = { version = "~0.12", features = ["blocking", "json"] } diff --git a/ghostflow-gitlab/Cargo.toml b/ghostflow-gitlab/Cargo.toml index e9deac17..e98c729e 100644 --- a/ghostflow-gitlab/Cargo.toml +++ b/ghostflow-gitlab/Cargo.toml @@ -16,7 +16,7 @@ edition.workspace = true [dependencies] chrono = { version = "~0.4.16", default-features = false } http = "^1" -itertools = "~0.12" +itertools = "~0.14" regex = "^1.0" serde = { version = "~1.0", features = ["derive"] } thiserror = "^1.0.2" diff --git a/ghostflow/Cargo.toml b/ghostflow/Cargo.toml index 82f86746..01d75092 100644 --- a/ghostflow/Cargo.toml +++ b/ghostflow/Cargo.toml @@ -25,7 +25,7 @@ libc = "~0.2" derive_builder = "~0.12" digest = "~0.10" either = "^1.0" -itertools = "~0.12" +itertools = "~0.14" log = "~0.4.4" md-5 = "~0.10" rand = "~0.8" diff --git a/ghostflow/src/actions/reformat.rs b/ghostflow/src/actions/reformat.rs index 4f90f82e..3c9cb880 100644 --- a/ghostflow/src/actions/reformat.rs +++ b/ghostflow/src/actions/reformat.rs @@ -903,7 +903,7 @@ impl Reformat { let mut set_count: usize = 0; let mut running_size = 0; - let groups = paths.group_by(|path| { + let groups = paths.chunk_by(|path| { let len = path.as_bytes().len(); if running_size + len >= SAFE_PATH_SIZE { running_size = len; -- GitLab From ea0f69c9be102442a66f5748b9e1e975ca6b7cfe Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 11:44:03 +0100 Subject: [PATCH 2/9] rand: update to 0.9 --- ghostflow/Cargo.toml | 2 +- ghostflow/src/actions/test/jobs.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ghostflow/Cargo.toml b/ghostflow/Cargo.toml index 01d75092..1768817f 100644 --- a/ghostflow/Cargo.toml +++ b/ghostflow/Cargo.toml @@ -28,7 +28,7 @@ either = "^1.0" itertools = "~0.14" log = "~0.4.4" md-5 = "~0.10" -rand = "~0.8" +rand = "~0.9" rayon = "^1.0" rustversion = "^1.0" sha2 = "~0.10" diff --git a/ghostflow/src/actions/test/jobs.rs b/ghostflow/src/actions/test/jobs.rs index c376ae72..518e66e8 100644 --- a/ghostflow/src/actions/test/jobs.rs +++ b/ghostflow/src/actions/test/jobs.rs @@ -146,8 +146,8 @@ impl TestJobs { /// Queue a job into the target directory. fn queue_job(&self, data: Value) -> TestJobsResult<()> { - let rndpart = rand::thread_rng() - .sample_iter(&rand::distributions::Alphanumeric) + let rndpart = rand::rng() + .sample_iter(&rand::distr::Alphanumeric) .map(char::from) .take(12) .collect::(); -- GitLab From 193f7cde723ba7489d6506036d723024e6d9e3d3 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 11:44:11 +0100 Subject: [PATCH 3/9] derive_builder: update to 0.20 --- ghostflow/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghostflow/Cargo.toml b/ghostflow/Cargo.toml index 1768817f..20f28479 100644 --- a/ghostflow/Cargo.toml +++ b/ghostflow/Cargo.toml @@ -22,7 +22,7 @@ git-checks = "^4.2" libc = "~0.2" [dependencies] -derive_builder = "~0.12" +derive_builder = "~0.20" digest = "~0.10" either = "^1.0" itertools = "~0.14" -- GitLab From f2205f7594c6cf3d30aa0b201aab5c1563f5ca37 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 11:45:21 +0100 Subject: [PATCH 4/9] env_logger: update to 0.11 --- ghostflow-cli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghostflow-cli/Cargo.toml b/ghostflow-cli/Cargo.toml index 27259ccd..45337191 100644 --- a/ghostflow-cli/Cargo.toml +++ b/ghostflow-cli/Cargo.toml @@ -15,7 +15,7 @@ edition.workspace = true [dependencies] clap = { version = "^4", features = ["cargo"] } -env_logger = "~0.10" +env_logger = "~0.11" erased-serde = "~0.3" ghostflow = { path = "../ghostflow" } ghostflow-github = { path = "../ghostflow-github" } -- GitLab From 3bcbcf77ee241b111a4829e62d0e30a0c34c3ed4 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 13:38:17 +0100 Subject: [PATCH 5/9] thiserror: update to 2.0 --- ghostflow-cli/Cargo.toml | 2 +- ghostflow-github/Cargo.toml | 2 +- ghostflow-gitlab/Cargo.toml | 2 +- ghostflow/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ghostflow-cli/Cargo.toml b/ghostflow-cli/Cargo.toml index 45337191..78e6a1bb 100644 --- a/ghostflow-cli/Cargo.toml +++ b/ghostflow-cli/Cargo.toml @@ -30,5 +30,5 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_yaml = "~0.9" termcolor = "^1.0" -thiserror = "^1.0" +thiserror = "^2" yaml-merge-keys = { version = "~0.7", features = ["serde_yaml"] } diff --git a/ghostflow-github/Cargo.toml b/ghostflow-github/Cargo.toml index 8694eb14..3ac0aa3b 100644 --- a/ghostflow-github/Cargo.toml +++ b/ghostflow-github/Cargo.toml @@ -21,7 +21,7 @@ jsonwebtoken = "^9.0" log = "~0.4.4" reqwest = { version = "~0.12", features = ["blocking", "json"] } serde_json = "^1.0" -thiserror = "^1.0.2" +thiserror = "^2" ttl_cache = "~0.5" url = "^2.0" diff --git a/ghostflow-gitlab/Cargo.toml b/ghostflow-gitlab/Cargo.toml index e98c729e..7c161830 100644 --- a/ghostflow-gitlab/Cargo.toml +++ b/ghostflow-gitlab/Cargo.toml @@ -19,7 +19,7 @@ http = "^1" itertools = "~0.14" regex = "^1.0" serde = { version = "~1.0", features = ["derive"] } -thiserror = "^1.0.2" +thiserror = "^2" url = "^2.3" ghostflow = { version = "~0.1", path = "../ghostflow" } diff --git a/ghostflow/Cargo.toml b/ghostflow/Cargo.toml index 20f28479..9380a869 100644 --- a/ghostflow/Cargo.toml +++ b/ghostflow/Cargo.toml @@ -33,7 +33,7 @@ rayon = "^1.0" rustversion = "^1.0" sha2 = "~0.10" tempfile = "^3.2.0" -thiserror = "^1.0.4" +thiserror = "^2" topological-sort = "~0.2.0" wait-timeout = "~0.2" -- GitLab From 1851a59f36be7b28adef66d9f7eeff4fd15b8f3e Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 13:38:33 +0100 Subject: [PATCH 6/9] yaml-merge-keys: update to 0.8.1 --- ghostflow-cli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghostflow-cli/Cargo.toml b/ghostflow-cli/Cargo.toml index 78e6a1bb..2d019c1f 100644 --- a/ghostflow-cli/Cargo.toml +++ b/ghostflow-cli/Cargo.toml @@ -31,4 +31,4 @@ serde_json = "^1.0" serde_yaml = "~0.9" termcolor = "^1.0" thiserror = "^2" -yaml-merge-keys = { version = "~0.7", features = ["serde_yaml"] } +yaml-merge-keys = { version = "~0.8.1", features = ["serde_yaml"] } -- GitLab From a9c702ed6707dc008cd904c8d718fb48658bd64b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 13:38:48 +0100 Subject: [PATCH 7/9] cargo: replace `serde_yaml` with `serde_yml` This fork is maintained. --- ghostflow-cli/Cargo.toml | 4 ++-- ghostflow-cli/src/checks/config_parse.rs | 6 +++--- ghostflow-cli/src/config.rs | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ghostflow-cli/Cargo.toml b/ghostflow-cli/Cargo.toml index 2d019c1f..df71bbdf 100644 --- a/ghostflow-cli/Cargo.toml +++ b/ghostflow-cli/Cargo.toml @@ -28,7 +28,7 @@ log = "~0.4.4" rayon = "^1.0" serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" -serde_yaml = "~0.9" +serde_yml = "~0.0.12" termcolor = "^1.0" thiserror = "^2" -yaml-merge-keys = { version = "~0.8.1", features = ["serde_yaml"] } +yaml-merge-keys = { version = "~0.8.1", features = ["serde_yml"] } diff --git a/ghostflow-cli/src/checks/config_parse.rs b/ghostflow-cli/src/checks/config_parse.rs index 5d5ab9c4..5312ad88 100644 --- a/ghostflow-cli/src/checks/config_parse.rs +++ b/ghostflow-cli/src/checks/config_parse.rs @@ -47,7 +47,7 @@ impl ContentCheck for ValidGhostflowConfig { .output() .map_err(|err| GitError::subcommand("cat-file blob", err))?; - let _: std::result::Result = serde_yaml::from_slice(&cat_file.stdout) + let _: std::result::Result = serde_yml::from_slice(&cat_file.stdout) .map_err(|err| { let msg = format!( "{}the {} configuration file is not valid YAML: `{}`", @@ -58,7 +58,7 @@ impl ContentCheck for ValidGhostflowConfig { result.add_error(msg); }) .and_then(|doc| { - yaml_merge_keys::merge_keys_serde(doc).map_err(|err| { + yaml_merge_keys::merge_keys_serde_yml(doc).map_err(|err| { let msg = format!( "{}the {} configuration file has invalid merge keys: `{}`", commit_prefix_str(content, "is not allowed because"), @@ -69,7 +69,7 @@ impl ContentCheck for ValidGhostflowConfig { }) }) .and_then(|doc| { - serde_yaml::from_value(doc).map_err(|err| { + serde_yml::from_value(doc).map_err(|err| { let msg = format!( "{}the {} configuration file structure is not valid: `{}`", commit_prefix_str(content, "is not allowed because"), diff --git a/ghostflow-cli/src/config.rs b/ghostflow-cli/src/config.rs index c5af9966..5d05db85 100644 --- a/ghostflow-cli/src/config.rs +++ b/ghostflow-cli/src/config.rs @@ -26,7 +26,7 @@ pub enum ReadError { #[error("failed to parse YAML document: {}", source)] YamlParse { #[from] - source: serde_yaml::Error, + source: serde_yml::Error, }, #[error("failed to perform YAML merge keys: {}", source)] YamlMergeKeys { @@ -39,10 +39,10 @@ type ReadResult = Result; impl Read { fn from_bytes_impl(data: &[u8]) -> ReadResult { - serde_yaml::from_slice(data) + serde_yml::from_slice(data) .map_err(ReadError::from) - .and_then(|doc| yaml_merge_keys::merge_keys_serde(doc).map_err(ReadError::from)) - .and_then(|doc| serde_yaml::from_value(doc).map_err(ReadError::from)) + .and_then(|doc| yaml_merge_keys::merge_keys_serde_yml(doc).map_err(ReadError::from)) + .and_then(|doc| serde_yml::from_value(doc).map_err(ReadError::from)) } pub fn from_bytes(data: D) -> ReadResult -- GitLab From 3c2365d02ce88be18f7531447716f0b57dc8a565 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 13:39:11 +0100 Subject: [PATCH 8/9] git-checks-config: update to 0.3 Also update `erased-serde` to 0.4 to match. --- ghostflow-cli/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghostflow-cli/Cargo.toml b/ghostflow-cli/Cargo.toml index df71bbdf..e1c03842 100644 --- a/ghostflow-cli/Cargo.toml +++ b/ghostflow-cli/Cargo.toml @@ -16,10 +16,10 @@ edition.workspace = true [dependencies] clap = { version = "^4", features = ["cargo"] } env_logger = "~0.11" -erased-serde = "~0.3" +erased-serde = "~0.4" ghostflow = { path = "../ghostflow" } ghostflow-github = { path = "../ghostflow-github" } -git-checks-config = "^0.2.1" +git-checks-config = "^0.3" git-checks-core = "^1.2.2" git-checks = { version = "^4.2", features = ["config"] } git-workarea = "^4.2" -- GitLab From cb853c471aa86d839b14a8057ffa4fea20a59fdc Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 7 Mar 2025 14:38:00 +0100 Subject: [PATCH 9/9] gitlab: update to 0.1709.2 --- ghostflow-gitlab/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghostflow-gitlab/Cargo.toml b/ghostflow-gitlab/Cargo.toml index 7c161830..4280e068 100644 --- a/ghostflow-gitlab/Cargo.toml +++ b/ghostflow-gitlab/Cargo.toml @@ -24,4 +24,4 @@ url = "^2.3" ghostflow = { version = "~0.1", path = "../ghostflow" } git-workarea = "^4.0" -gitlab = "=0.1708.2" +gitlab = "=0.1709.2" -- GitLab