diff --git a/Cargo.lock b/Cargo.lock index d59f674f..7da1bf26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1100,7 +1100,7 @@ dependencies = [ "mergify-test-support", "serde", "serde_json", - "serde_norway", + "serde_yaml_ng", "temp-env", "tempfile", "tokio", @@ -1823,19 +1823,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_norway" -version = "0.9.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e408f29489b5fd500fab51ff1484fc859bb655f32c671f307dcd733b72e8168c" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml-norway", -] - [[package]] name = "serde_yaml_ng" version = "0.10.0" @@ -2153,12 +2140,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "unsafe-libyaml-norway" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39abd59bf32521c7f2301b52d05a6a2c975b6003521cbd0c6dc1582f0a22104" - [[package]] name = "untrusted" version = "0.9.0" diff --git a/crates/mergify-config/Cargo.toml b/crates/mergify-config/Cargo.toml index e543dd5a..d7da3e78 100644 --- a/crates/mergify-config/Cargo.toml +++ b/crates/mergify-config/Cargo.toml @@ -14,7 +14,7 @@ mergify-core = { path = "../mergify-core" } jsonschema = { version = "0.46", default-features = false } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -serde_norway = "0.9" +serde_yaml_ng = "0.10" url = "2" [dev-dependencies] diff --git a/crates/mergify-config/src/validate.rs b/crates/mergify-config/src/validate.rs index e669ac32..1bdee53c 100644 --- a/crates/mergify-config/src/validate.rs +++ b/crates/mergify-config/src/validate.rs @@ -57,10 +57,10 @@ pub async fn run(explicit_path: Option<&Path>, output: &mut dyn Output) -> Resul fn load_yaml(path: &Path) -> Result { let text = std::fs::read_to_string(path) .map_err(|e| CliError::Configuration(format!("cannot read {}: {e}", path.display())))?; - // Parse as YAML into serde_norway::Value, then convert to JSON + // Parse as YAML into serde_yaml_ng::Value, then convert to JSON // so jsonschema can validate. The conversion is always lossless // for valid Mergify configs (mappings, sequences, scalars). - let yaml_value: serde_norway::Value = serde_norway::from_str(&text) + let yaml_value: serde_yaml_ng::Value = serde_yaml_ng::from_str(&text) .map_err(|e| CliError::Configuration(format!("Invalid YAML in {}: {e}", path.display())))?; // Mergify configs are YAML mappings at the top level; an empty // file deserializes to Null, which we treat as an empty mapping.