-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replacing serde-yaml #214
Comments
How do you think about pinning an older version of dependencies that increase their lower bound quicker than ideal? Or does force all dependencies to be old given cross-dependencies? |
I'm not sure yet if there is a hack that can be used to pin |
Ah, I was thinking to just lock the version in diff --git a/Cargo.lock b/Cargo.lock
index af4f2ab..74dd88b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,12 +11,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "autocfg"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
-
[[package]]
name = "base64"
version = "0.13.0"
@@ -124,6 +118,12 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "dtoa"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"
+
[[package]]
name = "encode_unicode"
version = "0.3.6"
@@ -164,22 +164,6 @@ dependencies = [
"regex",
]
-[[package]]
-name = "hashbrown"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
-
-[[package]]
-name = "indexmap"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
-dependencies = [
- "autocfg",
- "hashbrown",
-]
-
[[package]]
name = "insta"
version = "1.12.0"
@@ -404,12 +388,12 @@ dependencies = [
[[package]]
name = "serde_yaml"
-version = "0.8.23"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0"
+checksum = "ef8099d3df28273c99a1728190c7a9f19d444c941044f64adf986bee7ec53051"
dependencies = [
- "indexmap",
- "ryu",
+ "dtoa",
+ "linked-hash-map",
"serde",
"yaml-rust",
]
diff --git a/Cargo.toml b/Cargo.toml
index ab93d93..9cdcb5c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,7 +39,7 @@ backtrace = []
[dependencies]
csv = { version = "1.1.4", optional = true }
serde = { version = "1.0.117", features = ["derive"] }
-serde_yaml = "0.8.14"
+serde_yaml = "0.7"
console = { version = "0.15.0", optional = true, default-features = false }
serde_json = "1.0.59"
pest = { version = "2.1.3", optional = true } |
You're right that it works with |
I don't have time for this sadly and had to move up the minimum rust version to 1.56.1 since everything is broken on older Rusts now. See #231 |
Currently insta is very dependent on serde-yaml and it's a default dependency. This is lately turning into an issue as serde-yaml no longer has any guarantees for supporting Rust versions below 1.56 which is too new for a testing tool.
The core of the issue is hashbrown upgrading: rust-lang/hashbrown#310
Which in turn causes indexmap to upgrade: indexmap-rs/indexmap#214
I also brought up this issue with
serde-yaml
here: dtolnay/serde-yaml#233The latter issue is likely the only that matters. The issue was closed with wontfix which means that in the foreseeable future serde-yaml is going to move up. We currently unfortunately use the YAML format in two ways: read/write for the snapshot header and write only for the snapshots.
One option would be to make a hand written parser for the minimal header the snapshot files currently have and change the format to emit a simplified header in the future that does not require an external dependency. Then for the serialization implement the necessary YAML format pieces independently within the crate. This would make insta less dependent on the its dependencies.
The text was updated successfully, but these errors were encountered: