Replies: 4 comments 9 replies
-
two notes:
|
Beta Was this translation helpful? Give feedback.
-
So I've checked a decent chunk of insta's dependents to see if their existing test suites still pass (wasn't keeping count, probably 30-40 crates) The only issue I noticed that wasn't also reproducible on earlier versions of insta was Other than that all crates seemed fine in that both the existing test suites still passed, and snapshot files weren't updated with any changes 👍 |
Beta Was this translation helpful? Give feedback.
-
This worked out of the box for me on 2 projects I tested on, both using a mix of redactions (for the sorted fix). Didn't need to update the snaps either 👍. I test using Only change was this:
:D |
Beta Was this translation helpful? Give feedback.
-
Thanks for all the testing, 1.18.0 is now released. |
Beta Was this translation helpful? Give feedback.
-
I want to release insta 1.18.0 soon which is a major departure from earlier insta versions. In this version insta no longer uses
serde
by default. This has quite a bit of potential to introduce regressions so I would really appreciate early testing so that regressions are caught early.How to Test
To test upgrade to insta
1.18.0-alpha.1
and let me know how this went. You should not notice anything but you will get deprecation warnings if you useassert_json_snapshot!
orassert_yaml_snapshot!
. This is because in the future these macros will require explicit opting into thejson
andyaml
feature respectively.If you are using
cargo-insta
I would also appreciate tests on that version though1.17.x
releases ofcargo-insta
should be compatible.Why do this at all?
There are a handful of reasons why this change came about. With the release of
serde_yaml
0.9 all YAML snapshots broke which required me anyways to look into a future direction for how to emit snapshots. serde is an amazing serialization library but depending on the serialization format of serde for snapshot turns out to be problematic as serde does not guarantee any stability there. As such at least for the most common formats (JSON and YAML) I wanted to move to a first party maintained serializer anyways.Additionally for users who do not need
serde
based formats, pulling in these heavy dependencies makes the build times unnecessarily slow. These changes mean that without any default dependencies insta is now an incredibly light library:Even with serde it's now quite a bit lighter as it no longer depends on
serde_yaml
andserde_json
:This would not have been possible without the contribution of @LovecraftianHorror who landed the initial changes in #255 to drop the serde dependency.
Beta Was this translation helpful? Give feedback.
All reactions