-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Labels
Description
Right now ClickHouse parser does not recognizes that the following is invalid:
----
# foo
bar: 1And it does not throw any error and simply does not interpret bar: 1 at all:
yaml-cpp
$ util/parse /tmp/doc-start2.yaml
----
yq
$ yq /tmp/doc-start2.yaml
----
Error: bad file '/tmp/doc-start2.yaml': yaml: line 2: did not find expected <document start>
I did a brief review of existing YAML libraries:
- libyaml - Merge keys appear not to be supported yaml/libyaml#168
- does not support merge operator
- parser API emit alias events
- https://github.com/pantoniou/libfyaml
- not popular enough
- https://github.com/biojppm/rapidyaml
- merges keys incorrectly - Merge key order biojppm/rapidyaml#484
- code is complex
- c4core dependency
- yaml-cpp
- document start/end parsing is wrong - Forbid incorrect document start (---) jbeder/yaml-cpp#1333
TL;DR; - the issue in yaml-cpp should be fixed