biojppm / rapidyaml

Rapid YAML - a library to parse and emit YAML, and do it fast.
MIT License
568 stars 97 forks source link

[Bug] Text data with commas is incorrectly split #422

Closed sides-flow closed 4 months ago

sides-flow commented 5 months ago

I encountered an incorrect output with this data:

hello world, whats up?
it's a me, mario, 
bla,
asd

I expected the output to return the entire input as one value (just like all the other parsers do), instead of splitting it to multiple values using the commas.

https://play.yaml.io/main/parser?input=aGVsbG8gd29ybGQsIHdoYXRzIHVwPwppdCdzIGEgbWUsIG1hcmlvLCAKYmxhLAphc2Q= image

biojppm commented 5 months ago

Thanks for reporting, and the playground link is always nice.

The parser has been rewritten since, and this issue has been fixed in the new parser (see #414). I just added tests to confirm this case.

That PR should be merged in a few weeks.

sides-flow commented 5 months ago

Thanks for reporting, and the playground link is always nice.

The parser has been rewritten since, and this issue has been fixed in the new parser (see #414). I just added tests to confirm this case.

That PR should be merged in a few weeks.

Great, Looking forward for the next release! Thank you!

sides-flow commented 4 months ago

@biojppm Sorry to bump this, but do you have an estimate when a tag will be released for the new parser? I don't want to change my code according to the new parser's API and rewrite it afterwards in case changes will happen... Thanks!

biojppm commented 4 months ago

The new build is coming in a couple of weeks. Before making the release, I'm fuzzing the library to harden it, and this has revealed a handful of bugs that need fixing. So it may be a few days, or it may be 2 or 3 weeks.

In any case, you're pretty safe with changes: differences from the previous tag are limited, and it is highly unlikely that there will be further differences before the release. Unless you're doing special calls for parsing, it is likely that you don't have to change your code at all regardless of which release. And if you do, they will be limited. My advice is to do the jump now. Have a look at the current changelog and consider this.