Skip to content
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

Decide on future of YAML Support (Update to serde_yaml 0.9) #256

Closed
mitsuhiko opened this issue Jul 31, 2022 · 1 comment · Fixed by #264
Closed

Decide on future of YAML Support (Update to serde_yaml 0.9) #256

mitsuhiko opened this issue Jul 31, 2022 · 1 comment · Fixed by #264
Labels
enhancement New feature or request

Comments

@mitsuhiko
Copy link
Owner

There are now a handful of issues related to YAML in insta. #255 is a recent experiment by a contributor to drop the serde dependency which also moves to yaml-rust internally. The original issues with serde_yaml is tracked in #214.

The latest unrelated issue though is that serde_yaml in 0.9 has an incompatible serialization mode which completely changes how snapshots are rendered. This is a meta issue to figure out what to do there. For now the plan is to at the very least keep insta on 0.8 until a decision for #255 has been made.

@mitsuhiko
Copy link
Owner Author

I did not investigate the details yet but it very much looks like serde_yaml in 0.9 moved away from yaml-rust which in turn means that the format now is also different. It uses a C to Rust transpiled unsafe version of libyaml.

Longer term it's unclear what the maintenance of yaml-rust will be but it's not unlikely that the crate is good enough for the uses of serde. It also means that by passing serde_yaml retains the correct output format whereas upgrading to serde_yaml changes yaml snapshots (dtolnay/serde-yaml#297).

Given all this I am likely going to bypass serde_yaml for now and we cross the bridge of the future of yaml-rust when it comes to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant