Re: LibYAML tests fail in master (2021-12-20)
Andrey Somov <[email protected]> Tue, 21 Dec 2021 12:06:44 +0400
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <CALbkv0ciWHfbXBwqzLGnM-Gx-Pa39-7LNAHm-NayCaK6dLAR6w@mail.gmail.com> |
--===============9051256194944360183== Content-Type: multipart/alternative; boundary="00000000000023cdd505d3a37d97" --00000000000023cdd505d3a37d97 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 <[email protected]> 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=3DImJhciIJ 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/3411ed2868d4bc5b8c9c5f421565d= 2c887892329/docker/java/utils/java/src/test/java/org/yaml/editor/Snake2Even= tsTest.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-1vSlIvGsUqrCvf4s9PhVJeAyv= vlx0rOfZFgox4ZexwCYpPH0gdkQN36o0AJaDageHbLp-FgY538FLO5c/pubhtml?gid=3D0&sin= gle=3Dtrue> (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 an= d > secure Slack. > It works great, has great desktop and phone clients but also works just a= s > 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! > > =E2=80=94 Ingy > > On Mon, Dec 20, 2021 at 2:33 AM Andrey Somov <[email protected]> > 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 >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D >> Testsuite summary for yaml 0.2.5 >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D >> # TOTAL: 2 >> # PASS: 2 >> # SKIP: 0 >> # XFAIL: 0 >> # FAIL: 0 >> # XPASS: 0 >> # ERROR: 0 >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D >> 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=3Ddata >> 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 >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/yaml-core >> > --00000000000023cdd505d3a37d97 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Thank you for the answer. I will try to continue in E= lements</div><div><br></div><div>Cheers,</div><div>Andrey<br></div><div><br= ></div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr"= class=3D"gmail_attr">On Mon, Dec 20, 2021 at 9:51 PM Ingy dot Net <<a h= ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>> wrote:= <br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8= ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr= "><div dir=3D"ltr">Hi=C2=A0Andrey!<div><br></div><div>As a reminder, we don= 't use the mailing list for this or almost anything anymore.</div><div>= The <a href=3D"https://yaml.org/spec/1.2.2/ext/team/" target=3D"_blank">YAM= L language design team</a> is very active these days and we have a host of = modern ways to engage.</div><div><br></div><div>The short answer=C2=A0to yo= ur query is that in this case libyaml is right and pyyaml is wrong.<br>Apol= ogies for the libyaml tests not running out of the box.</div><div>That'= s on me, and I'll try to find some time to fix this at some point.<br><= br><a href=3D"https://play.yaml.io/main/parser?input=3DImJhciIJ" target=3D"= _blank">https://play.yaml.io/main/parser?input=3DImJhciIJ</a> shows the res= ults of 14 YAML parsers, and PyYAML, Ruamel (fork of PyYAML) and SnakeYAML = get this one wrong.<br>The <a href=3D"https://github.com/yaml/yaml-referenc= e-parser/" target=3D"_blank">New Reference Parser</a> there is literally <u= >generated</u> from the spec productions and therefore is almost always cor= rect in its interpretation.</div><div>That might be a useful resource for y= ou.<br><br>The productions involved in the (<a href=3D"https://yaml.com/blo= g/2021-10/new-yaml-spec/" target=3D"_blank">recently published</a>) <a href= =3D"https://yaml.org/spec/1.2.2/" target=3D"_blank">1.2.2 spec</a>=C2=A0are= :</div><div><ul><li><a href=3D"https://yaml.org/spec/1.2.2/#rule-c-ns-flow-= map-json-key-entry" target=3D"_blank">https://yaml.org/spec/1.2.2/#rule-c-n= s-flow-map-json-key-entry</a></li><ul><li><a href=3D"https://yaml.org/spec/= 1.2.2/#rule-c-flow-json-node" target=3D"_blank">https://yaml.org/spec/1.2.2= /#rule-c-flow-json-node<br></a></li><ul><li><a href=3D"https://yaml.org/spe= c/1.2.2/#rule-c-double-quoted" target=3D"_blank">https://yaml.org/spec/1.2.= 2/#rule-c-double-quoted</a></li></ul></ul><li><a href=3D"https://yaml.org/s= pec/1.2.2/#rule-s-separate" target=3D"_blank">https://yaml.org/spec/1.2.2/#= rule-s-separate</a></li><ul><li><a href=3D"https://yaml.org/spec/1.2.2/#rul= e-s-separate-in-line" target=3D"_blank">https://yaml.org/spec/1.2.2/#rule-s= -separate-in-line</a></li><ul><li><a href=3D"https://yaml.org/spec/1.2.2/#r= ule-s-white" target=3D"_blank">https://yaml.org/spec/1.2.2/#rule-s-white</a= ></li><li>Which is spaces and tabs</li></ul></ul></ul>Put another way, non-= indentation whitespace is usually tabs and spaces.<br>Note: I'm not per= sonally a fan of allowing tabs anywhere (except in literal scalar content),= but that's where the 1.2 productions stand.=C2=A0<br><div><br></div>I = assume you are aware of the <a href=3D"https://github.com/yaml/yaml-test-su= ite" target=3D"_blank">YAML test suite</a>.=C2=A0</div><div>Our testing of = compliant frameworks is shown in the <a href=3D"https://matrix.yaml.info/" = target=3D"_blank">YAML Test Matrix</a>.<br><a href=3D"https://bitbucket.org= /snakeyaml/snakeyaml/src/master/" target=3D"_blank">SnakeYAML</a>=C2=A0is f= ailing quite a bit, but then again so are libyaml and PyYAML.</div><div>Unf= ortunately we don't yet have support for <a href=3D"https://bitbucket.o= rg/snakeyaml/snakeyaml-engine/src/master/" target=3D"_blank">SnakeYAML=C2= =A0 Engine</a>=C2=A0yet but we just need someone to write a port of <a href= =3D"https://github.com/yaml/yaml-runtimes/blob/3411ed2868d4bc5b8c9c5f421565= d2c887892329/docker/java/utils/java/src/test/java/org/yaml/editor/Snake2Eve= ntsTest.java" target=3D"_blank">the tester</a>=C2=A0to have it included in = the results.</div><div>Also, speaking of libyaml, I should point out the ne= w C library for yaml called <a href=3D"https://github.com/pantoniou/libfyam= l" target=3D"_blank">libfyaml</a>=C2=A0which is quite an amazing work.</div= ><div><br></div><div>Regarding the testing of libyaml (and everything else)= , running '<font face=3D"monospace">make clean run-tests export'</f= ont> in the YAML test suite directory creates an export.tsv file which we c= opy/paste into this <a href=3D"https://docs.google.com/spreadsheets/d/e/2PA= CX-1vSlIvGsUqrCvf4s9PhVJeAyvvlx0rOfZFgox4ZexwCYpPH0gdkQN36o0AJaDageHbLp-FgY= 538FLO5c/pubhtml?gid=3D0&single=3Dtrue" target=3D"_blank">Google Sheet<= /a>=C2=A0(with results totals) when the suite is updated.<br>So that's = an alternate way of testing libyaml...</div><div><br></div><div>We have a r= ather <a href=3D"https://matrix.to/#/%23chat:yaml.io" target=3D"_blank">new= community platform</a> for engaging directly with the core team about YAML= development or anything else YAML related.<br></div><div>If you haven'= t used element/matrix, I'd describe it as completely open and secure Sl= ack.</div><div>It works great, has great desktop and phone clients but also= works just as good in a browser, and is trivial to join.</div><div><br></d= iv><div>I'll also reply directly to your <a href=3D"https://github.com/= yaml/pyyaml/issues/594" target=3D"_blank">PyYAML issue</a>. :)</div><div><b= r></div><div>Almost all this info is on the plain old=C2=A0<a href=3D"https= ://yaml.org/" target=3D"_blank">https://yaml.org/</a> site which we are act= ively keeping up to date.</div><div><br></div><div>But personally, Andrey, = I really hope you join the new chat.<br>We really want SnakeYAML to be as g= ood as possible, and have been hoping to engage with you!</div><div><br></d= iv><div>BTW, no foul in posting here.</div><div>It gave me a great excuse t= o promote some of the recent YAML work.</div><div>I hope you and other read= ers find it useful.</div><div><br></div><div>Thanks and happy end of 2021!<= /div><div><br></div><div>=E2=80=94 Ingy</div></div><br><div class=3D"gmail_= quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Dec 20, 2021 at 2:33 A= M Andrey Somov <<a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a>> wrote:<br></div><blockquote class=3D"gma= il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2= 04,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi all,</div><div>I wanted = to have a look at LibYAML to understand the reason for <a href=3D"https://g= ithub.com/yaml/pyyaml/issues/594" target=3D"_blank">https://github.com/yaml= /pyyaml/issues/594</a></div><div><br></div><div>Unfortunately the tests fai= l in master.</div><div>Can you please help me to make the tests run ?<br></= div><div><br></div><div>tests/run-all-tests.sh</div><div>...<br></div><div>= make[2]: Entering directory '/home/ooosssmmm/rev-projects/yaml/libyaml/= tests'<br>PASS: test-version<br>PASS: test-reader<br>=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>Testsuite s= ummary for yaml 0.2.5<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br># TOTAL: 2<br># PASS: =C2=A02<br># SKIP: = =C2=A00<br># XFAIL: 0<br># FAIL: =C2=A00<br># XPASS: 0<br># ERROR: 0<br>=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= <br>make[2]: Leaving directory '/home/ooosssmmm/rev-projects/yaml/libya= ml/tests'<br>make[1]: Leaving directory '/home/ooosssmmm/rev-projec= ts/yaml/libyaml/tests'<br>git branch --track run-test-suite origin/run-= test-suite<br>fatal: A branch named 'run-test-suite' already exists= .<br>make: [Makefile:888: tests/run-test-suite] Error 128 (ignored)<br>git = worktree prune<br>git worktree add tests/run-test-suite run-test-suite<br>P= reparing worktree (checking out 'run-test-suite')<br>HEAD is now at= 7b73fcf Move testing code into run-test-suite-code branch<br>make -C tests= /run-test-suite test<br>make[1]: Entering directory '/home/ooosssmmm/re= v-projects/yaml/libyaml/tests/run-test-suite'<br>git clone <a href=3D"h= ttps://github.com/yaml/yaml-test-suite" target=3D"_blank">https://github.co= m/yaml/yaml-test-suite</a> data --branch=3Ddata<br>Cloning into 'data&#= 39;...<br>remote: Enumerating objects: 16712, done.<br>remote: Counting obj= ects: 100% (2667/2667), done.<br>remote: Compressing objects: 100% (1313/13= 13), done.<br>remote: Total 16712 (delta 1663), reused 2067 (delta 1160), p= ack-reused 14045<br>Receiving objects: 100% (16712/16712), 4.84 MiB | 2.24 = MiB/s, done.<br>Resolving deltas: 100% (10668/10668), done.<br>(cd data &am= p;& git reset --hard daf799e56372aa93c324d111c73b47a431d7e03b)<br>fatal= : Could not parse object 'daf799e56372aa93c324d111c73b47a431d7e03b'= .<br>make[1]: *** [Makefile:25: data] Error 128<br>make[1]: Leaving directo= ry '/home/ooosssmmm/rev-projects/yaml/libyaml/tests/run-test-suite'= <br>make: *** [Makefile:882: test-suite] Error 2</div></div> _______________________________________________<br> Yaml-core mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Yaml-c= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/yaml-core" rel=3D"n= oreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/y= aml-core</a><br> </blockquote></div></div> </blockquote></div> --00000000000023cdd505d3a37d97-- --===============9051256194944360183== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============9051256194944360183== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Yaml-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/yaml-core --===============9051256194944360183==--