From: Andrey S. <pub...@gm...> - 2021-12-21 08:07:06
|
Thank you for the answer. I will try to continue in Elements Cheers, Andrey On Mon, Dec 20, 2021 at 9:51 PM Ingy dot Net <in...@in...> wrote: > Hi Andrey! > > As a reminder, we don't use the mailing list for this or almost anything > anymore. > The YAML language design team <https://yaml.org/spec/1.2.2/ext/team/> is > very active these days and we have a host of modern ways to engage. > > The short answer to your query is that in this case libyaml is right and > pyyaml is wrong. > Apologies for the libyaml tests not running out of the box. > That's on me, and I'll try to find some time to fix this at some point. > > https://play.yaml.io/main/parser?input=ImJhciIJ shows the results of 14 > YAML parsers, and PyYAML, Ruamel (fork of PyYAML) and SnakeYAML get this > one wrong. > The New Reference Parser <https://github.com/yaml/yaml-reference-parser/> > there is literally *generated* from the spec productions and therefore is > almost always correct in its interpretation. > That might be a useful resource for you. > > The productions involved in the (recently published > <https://yaml.com/blog/2021-10/new-yaml-spec/>) 1.2.2 spec > <https://yaml.org/spec/1.2.2/> are: > > - https://yaml.org/spec/1.2.2/#rule-c-ns-flow-map-json-key-entry > - https://yaml.org/spec/1.2.2/#rule-c-flow-json-node > - https://yaml.org/spec/1.2.2/#rule-c-double-quoted > - https://yaml.org/spec/1.2.2/#rule-s-separate > - https://yaml.org/spec/1.2.2/#rule-s-separate-in-line > - https://yaml.org/spec/1.2.2/#rule-s-white > - Which is spaces and tabs > > Put another way, non-indentation whitespace is usually tabs and spaces. > Note: I'm not personally a fan of allowing tabs anywhere (except in > literal scalar content), but that's where the 1.2 productions stand. > > I assume you are aware of the YAML test suite > <https://github.com/yaml/yaml-test-suite>. > Our testing of compliant frameworks is shown in the YAML Test Matrix > <https://matrix.yaml.info/>. > SnakeYAML <https://bitbucket.org/snakeyaml/snakeyaml/src/master/> is > failing quite a bit, but then again so are libyaml and PyYAML. > Unfortunately we don't yet have support for SnakeYAML Engine > <https://bitbucket.org/snakeyaml/snakeyaml-engine/src/master/> yet but we > just need someone to write a port of the tester > <https://github.com/yaml/yaml-runtimes/blob/3411ed2868d4bc5b8c9c5f421565d2c887892329/docker/java/utils/java/src/test/java/org/yaml/editor/Snake2EventsTest.java> to > have it included in the results. > Also, speaking of libyaml, I should point out the new C library for yaml > called libfyaml <https://github.com/pantoniou/libfyaml> which is quite an > amazing work. > > Regarding the testing of libyaml (and everything else), running 'make > clean run-tests export' in the YAML test suite directory creates an > export.tsv file which we copy/paste into this Google Sheet > <https://docs.google.com/spreadsheets/d/e/2PACX-1vSlIvGsUqrCvf4s9PhVJeAyvvlx0rOfZFgox4ZexwCYpPH0gdkQN36o0AJaDageHbLp-FgY538FLO5c/pubhtml?gid=0&single=true> (with > results totals) when the suite is updated. > So that's an alternate way of testing libyaml... > > We have a rather new community platform > <https://matrix.to/#/%23chat:yaml.io> for engaging directly with the core > team about YAML development or anything else YAML related. > If you haven't used element/matrix, I'd describe it as completely open and > secure Slack. > It works great, has great desktop and phone clients but also works just as > good in a browser, and is trivial to join. > > I'll also reply directly to your PyYAML issue > <https://github.com/yaml/pyyaml/issues/594>. :) > > Almost all this info is on the plain old https://yaml.org/ site which we > are actively keeping up to date. > > But personally, Andrey, I really hope you join the new chat. > We really want SnakeYAML to be as good as possible, and have been hoping > to engage with you! > > BTW, no foul in posting here. > It gave me a great excuse to promote some of the recent YAML work. > I hope you and other readers find it useful. > > Thanks and happy end of 2021! > > — Ingy > > On Mon, Dec 20, 2021 at 2:33 AM Andrey Somov <pub...@gm...> > wrote: > >> Hi all, >> I wanted to have a look at LibYAML to understand the reason for >> https://github.com/yaml/pyyaml/issues/594 >> >> Unfortunately the tests fail in master. >> Can you please help me to make the tests run ? >> >> tests/run-all-tests.sh >> ... >> make[2]: Entering directory >> '/home/ooosssmmm/rev-projects/yaml/libyaml/tests' >> PASS: test-version >> PASS: test-reader >> >> ============================================================================ >> Testsuite summary for yaml 0.2.5 >> >> ============================================================================ >> # TOTAL: 2 >> # PASS: 2 >> # SKIP: 0 >> # XFAIL: 0 >> # FAIL: 0 >> # XPASS: 0 >> # ERROR: 0 >> >> ============================================================================ >> make[2]: Leaving directory >> '/home/ooosssmmm/rev-projects/yaml/libyaml/tests' >> make[1]: Leaving directory >> '/home/ooosssmmm/rev-projects/yaml/libyaml/tests' >> git branch --track run-test-suite origin/run-test-suite >> fatal: A branch named 'run-test-suite' already exists. >> make: [Makefile:888: tests/run-test-suite] Error 128 (ignored) >> git worktree prune >> git worktree add tests/run-test-suite run-test-suite >> Preparing worktree (checking out 'run-test-suite') >> HEAD is now at 7b73fcf Move testing code into run-test-suite-code branch >> make -C tests/run-test-suite test >> make[1]: Entering directory >> '/home/ooosssmmm/rev-projects/yaml/libyaml/tests/run-test-suite' >> git clone https://github.com/yaml/yaml-test-suite data --branch=data >> Cloning into 'data'... >> remote: Enumerating objects: 16712, done. >> remote: Counting objects: 100% (2667/2667), done. >> remote: Compressing objects: 100% (1313/1313), done. >> remote: Total 16712 (delta 1663), reused 2067 (delta 1160), pack-reused >> 14045 >> Receiving objects: 100% (16712/16712), 4.84 MiB | 2.24 MiB/s, done. >> Resolving deltas: 100% (10668/10668), done. >> (cd data && git reset --hard daf799e56372aa93c324d111c73b47a431d7e03b) >> fatal: Could not parse object 'daf799e56372aa93c324d111c73b47a431d7e03b'. >> make[1]: *** [Makefile:25: data] Error 128 >> make[1]: Leaving directory >> '/home/ooosssmmm/rev-projects/yaml/libyaml/tests/run-test-suite' >> make: *** [Makefile:882: test-suite] Error 2 >> _______________________________________________ >> Yaml-core mailing list >> Yam...@li... >> https://lists.sourceforge.net/lists/listinfo/yaml-core >> > |