Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@vroland I haven't looked through the yaml-rust changes in detail so I need your advice -- is this safe to publish as 0.7.3 of serde-yaml or does the input/output change in a way that requires a major version from us? |
@@ -94,7 +94,7 @@ fn test_map() { | |||
let yaml = unindent(r#" | |||
--- | |||
x: 1 | |||
y: 2"#); | |||
"y": 2"#); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is wrong and there is some bug... @dtolnay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is from chyh1990/yaml-rust#72.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is probably an issue with the emitter. But this is more of a cosmetic issue, as it is still valid YAML with the same meaning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is intended to keep any other yaml1.1 (not 1.2) parser from interpreting this as a boolean. I am currently unaware whether this ought to be treated differently when the value is a key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried the yaml parser in ruby 2.3, 'Y', 'y', 'N', 'n' is not interpreted as boolean in both keys and values. But 'YES', 'yes', 'NO', 'no' is boolean in ruby. PyYAML also works like this.
I know it is violating YAML spec, the using 'y' in key is a common case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ruby parses an pyyaml are all 1.1 parsers
As far as I am aware these breaking changes are only present in parser event handling, which is not exposed by serde-yaml. But ScanError struct contains an additional field "mark". If this is a problem we need a higher version. |
It looks v0.4 changes the rendering for certain cases. Previously, I got:
Now I get:
I found it confusing that the major version did not increase. (Also, the quoting around just |
@Rufflewind: semver allows this. Below 1.0 every 0.X version may contain breaking changes. |
As yaml-rust 0.4 got publisched on crates.io recently, it would be nice to use it for serde-yaml. There are some some fixes (especially for the emitter) I'd really like use with serde.