-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
assert_toml_snapshot
produces invalid TOML when the toml
library would generate an error.
#439
Comments
This is an issue with the old version of toml that insta depends on. Upgrading to a newer one will unfortunately break all snapshots because the format of strings changed |
One possibility that comes to mind is to introduce a new feature to the crate along the lines of I'm not sure if it's worth the trouble, though. |
The new feature is clever... ...though from someone who is not a maintainer (but a keen advocate and has contributed over the years) — a breaking change seems fairly reasonable. Cargo's dependency management means that it's a single commit; it's not like different contributors are clashing on different versions... |
I wonder if the right course of action here is a major version of insta that bumps up these old libraries. |
That sounds great to me, if you are willing. I am not sure whether or not this would inconvenience others. |
What happened?
Here is a demo (using
toml
,maplit
andinsta {features=["serde"]}
crates. Note how the firstassert_toml_snaphot
produces invalid TOML. The rest of the example is simply to provide some context of how the TOML library errors out and to confirm that JSON is generated correctly:Reproduction steps
No response
Insta Version
1.34.0
rustc Version
1.78.0-nightly (d44e3b95c 2024-02-09)
What did you expect?
I guess
assert_toml_snapshot
should have panicked.The text was updated successfully, but these errors were encountered: