diff --git a/Cargo.lock b/Cargo.lock index e5c1841..f353286 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,12 +246,6 @@ version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -436,14 +430,15 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.26" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "92b5b431e8907b50339b51223b97d102db8d987ced36f6e4d03621db9316c834" dependencies = [ "indexmap", + "itoa", "ryu", "serde", - "yaml-rust", + "unsafe-libyaml", ] [[package]] @@ -564,6 +559,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +[[package]] +name = "unsafe-libyaml" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7ed8ba44ca06be78ea1ad2c3682a43349126c8818054231ee6f4748012aed2" + [[package]] name = "utf8parse" version = "0.2.0" @@ -686,12 +687,3 @@ name = "xml-rs" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] diff --git a/Cargo.toml b/Cargo.toml index eb260d0..51b1e67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ abortable_parser = "=0.2.3" clap = "~2.33.0" serde_json = "~1.0.9" simple-error = "0.2.0" -serde_yaml = "0.8.17" +serde_yaml = "0.9.16" toml = "~0.5.8" xml-rs = "0.8.0" base64 = "0.21.0" diff --git a/src/convert/yaml.rs b/src/convert/yaml.rs index a38d6ea..1a507b0 100644 --- a/src/convert/yaml.rs +++ b/src/convert/yaml.rs @@ -77,8 +77,10 @@ impl YamlConverter { serde_yaml::Value::Null => "null".to_string(), serde_yaml::Value::Number(n) => n.to_string(), serde_yaml::Value::String(s) => s.clone(), - serde_yaml::Value::Sequence(_) | serde_yaml::Value::Mapping(_) => { - eprintln!("Unsupported key type in yaml import skipping"); + serde_yaml::Value::Sequence(_) + | serde_yaml::Value::Mapping(_) + | serde_yaml::Value::Tagged(_) => { + eprintln!("Unsupported key type in yaml map key import skipping"); continue; } }; @@ -127,6 +129,12 @@ impl YamlConverter { collapsed.reverse(); Val::Tuple(collapsed) } + serde_yaml::Value::Tagged(_) => { + eprintln!( + "Tagged value types are not supported in yaml imports. Replacing with Empty..." + ); + Val::Empty + } }) }