-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert removing of open_ended after top level plain scalar #122
Conversation
@ingydotnet Could you add |
can you please also apply the second part of the patch on #60? |
@LocutusOfBorg yeah, I was looking at it. Funnily I read this issue only after I searched for the cause of the test failures myself =) I have to first run a whole lotta tests on it, with pyyaml, with perl's YAML::LibYAML, and yaml-test-suite, to make sure it isn't breaking something else. |
I added the patch, thanks @jrtc27 @ingydotnet the tests are passing again, no need to skip them. As a side note:
Then the document-end marker should be emitted, even if not requested, because the exact number of trailing lines needs to be preserved. |
You missed the 7 on my username for the second commit :) |
@jrtc27 oops, will fix it ;-) |
8e33199
to
56f4b17
Compare
fixed typo and force pushed |
Applied. Pushed. Thanks! |
Changes ======= * yaml/libyaml#95 -- build: do not install config.h * yaml/libyaml#97 -- appveyor.yml: fix Release build * yaml/libyaml#103 -- Remove unused code in yaml_document_delete * yaml/libyaml#104 -- Allow colons in plain scalars inside flow collections * yaml/libyaml#109 -- Fix comparison in tests/run-emitter.c * yaml/libyaml#117 -- Fix typo error * yaml/libyaml#119 -- The closing single quote needs to be indented... * yaml/libyaml#121 -- fix token name typos in comments * yaml/libyaml#122 -- Revert removing of open_ended after top level plain scalar * yaml/libyaml#125 -- Cherry-picks from PR 27 * yaml/libyaml#135 -- Windows/C89 compatibility * yaml/libyaml#136 -- allow override of Windows static lib name
Fix portlint errors in Makefile Changes in 0.2.2: * yaml/libyaml#95 -- build: do not install config.h * yaml/libyaml#97 -- appveyor.yml: fix Release build * yaml/libyaml#103 -- Remove unused code in yaml_document_delete * yaml/libyaml#104 -- Allow colons in plain scalars inside flow collections * yaml/libyaml#109 -- Fix comparison in tests/run-emitter.c * yaml/libyaml#117 -- Fix typo error * yaml/libyaml#119 -- The closing single quote needs to be indented... * yaml/libyaml#121 -- fix token name typos in comments * yaml/libyaml#122 -- Revert removing of open_ended after top level plain scalar * yaml/libyaml#125 -- Cherry-picks from PR 27 * yaml/libyaml#135 -- Windows/C89 compatibility * yaml/libyaml#136 -- allow override of Windows static lib name git-svn-id: svn+ssh://svn.freebsd.org/ports/head@498674 35697150-7ecd-e111-bb59-0022644237b5
Fix portlint errors in Makefile Changes in 0.2.2: * yaml/libyaml#95 -- build: do not install config.h * yaml/libyaml#97 -- appveyor.yml: fix Release build * yaml/libyaml#103 -- Remove unused code in yaml_document_delete * yaml/libyaml#104 -- Allow colons in plain scalars inside flow collections * yaml/libyaml#109 -- Fix comparison in tests/run-emitter.c * yaml/libyaml#117 -- Fix typo error * yaml/libyaml#119 -- The closing single quote needs to be indented... * yaml/libyaml#121 -- fix token name typos in comments * yaml/libyaml#122 -- Revert removing of open_ended after top level plain scalar * yaml/libyaml#125 -- Cherry-picks from PR 27 * yaml/libyaml#135 -- Windows/C89 compatibility * yaml/libyaml#136 -- allow override of Windows static lib name git-svn-id: svn+ssh://svn.freebsd.org/ports/head@498674 35697150-7ecd-e111-bb59-0022644237b5
Fix portlint errors in Makefile Changes in 0.2.2: * yaml/libyaml#95 -- build: do not install config.h * yaml/libyaml#97 -- appveyor.yml: fix Release build * yaml/libyaml#103 -- Remove unused code in yaml_document_delete * yaml/libyaml#104 -- Allow colons in plain scalars inside flow collections * yaml/libyaml#109 -- Fix comparison in tests/run-emitter.c * yaml/libyaml#117 -- Fix typo error * yaml/libyaml#119 -- The closing single quote needs to be indented... * yaml/libyaml#121 -- fix token name typos in comments * yaml/libyaml#122 -- Revert removing of open_ended after top level plain scalar * yaml/libyaml#125 -- Cherry-picks from PR 27 * yaml/libyaml#135 -- Windows/C89 compatibility * yaml/libyaml#136 -- allow override of Windows static lib name
Fix portlint errors in Makefile Changes in 0.2.2: * yaml/libyaml#95 -- build: do not install config.h * yaml/libyaml#97 -- appveyor.yml: fix Release build * yaml/libyaml#103 -- Remove unused code in yaml_document_delete * yaml/libyaml#104 -- Allow colons in plain scalars inside flow collections * yaml/libyaml#109 -- Fix comparison in tests/run-emitter.c * yaml/libyaml#117 -- Fix typo error * yaml/libyaml#119 -- The closing single quote needs to be indented... * yaml/libyaml#121 -- fix token name typos in comments * yaml/libyaml#122 -- Revert removing of open_ended after top level plain scalar * yaml/libyaml#125 -- Cherry-picks from PR 27 * yaml/libyaml#135 -- Windows/C89 compatibility * yaml/libyaml#136 -- allow override of Windows static lib name
Fix portlint errors in Makefile Changes in 0.2.2: * yaml/libyaml#95 -- build: do not install config.h * yaml/libyaml#97 -- appveyor.yml: fix Release build * yaml/libyaml#103 -- Remove unused code in yaml_document_delete * yaml/libyaml#104 -- Allow colons in plain scalars inside flow collections * yaml/libyaml#109 -- Fix comparison in tests/run-emitter.c * yaml/libyaml#117 -- Fix typo error * yaml/libyaml#119 -- The closing single quote needs to be indented... * yaml/libyaml#121 -- fix token name typos in comments * yaml/libyaml#122 -- Revert removing of open_ended after top level plain scalar * yaml/libyaml#125 -- Cherry-picks from PR 27 * yaml/libyaml#135 -- Windows/C89 compatibility * yaml/libyaml#136 -- allow override of Windows static lib name git-svn-id: svn+ssh://svn.freebsd.org/ports/head@498674 35697150-7ecd-e111-bb59-0022644237b5
Changes ======= * yaml/libyaml#95 -- build: do not install config.h * yaml/libyaml#97 -- appveyor.yml: fix Release build * yaml/libyaml#103 -- Remove unused code in yaml_document_delete * yaml/libyaml#104 -- Allow colons in plain scalars inside flow collections * yaml/libyaml#109 -- Fix comparison in tests/run-emitter.c * yaml/libyaml#117 -- Fix typo error * yaml/libyaml#119 -- The closing single quote needs to be indented... * yaml/libyaml#121 -- fix token name typos in comments * yaml/libyaml#122 -- Revert removing of open_ended after top level plain scalar * yaml/libyaml#125 -- Cherry-picks from PR 27 * yaml/libyaml#135 -- Windows/C89 compatibility * yaml/libyaml#136 -- allow override of Windows static lib name
In YAML 1.1, the document end marker `...` is optional even if the next document starts with a directive: https://github.com/yaml/pyyaml/blob/master/tests/data/spec-07-09.canonical ``` %YAML 1.1 --- !!str "foo" %YAML 1.1 --- !!str "bar" %YAML 1.1 --- !!str "baz" ``` It is only required if the scalar is "open ended", for example for plain scalars. In YAML 1.2 the `...` marker is always required before a directive. My suggestion would be to make the output 1.2 compatible. It will still be 1.1 compatible, so that shouldn't be a problem. I believe this will also make it easier to fix #123 which was introduced with the last fixes regarding `open_ended`. I think I can make a fix for this soon after this issue is fixed. Fixing #123 without this would be a bit more complicated. If we do this, we also need to adjust PyYAML to behave the same. Related issues/commits: - #60 - #122 - 56400d9, 8ee83c0, 56f4b17
In YAML 1.1, the document end marker `...` is optional even if the next document starts with a directive: https://github.com/yaml/pyyaml/blob/master/tests/data/spec-07-09.canonical ``` %YAML 1.1 --- !!str "foo" %YAML 1.1 --- !!str "bar" %YAML 1.1 --- !!str "baz" ``` It is only required if the scalar is "open ended", for example for plain scalars. In YAML 1.2 the `...` marker is always required before a directive. My suggestion would be to make the output 1.2 compatible. It will still be 1.1 compatible, so that shouldn't be a problem. I believe this will also make it easier to fix #123 which was introduced with the last fixes regarding `open_ended`. I think I can make a fix for this soon after this issue is fixed. Fixing #123 without this would be a bit more complicated. If we do this, we also need to adjust PyYAML to behave the same. Related issues/commits: - #60 - #122 - 56400d9, 8ee83c0, 56f4b17
In YAML 1.1, the document end marker `...` is optional even if the next document starts with a directive: https://github.com/yaml/pyyaml/blob/master/tests/data/spec-07-09.canonical ``` %YAML 1.1 --- !!str "foo" %YAML 1.1 --- !!str "bar" %YAML 1.1 --- !!str "baz" ``` It is only required if the scalar is "open ended", for example for plain scalars. In YAML 1.2 the `...` marker is always required before a directive. My suggestion would be to make the output 1.2 compatible. It will still be 1.1 compatible, so that shouldn't be a problem. I believe this will also make it easier to fix #123 which was introduced with the last fixes regarding `open_ended`. I think I can make a fix for this soon after this issue is fixed. Fixing #123 without this would be a bit more complicated. If we do this, we also need to adjust PyYAML to behave the same. Related issues/commits: - #60 - #122 - 56400d9, 8ee83c0, 56f4b17
See also issue #60
This reverts commit 56400d9.
Currently tests will fail because we have the yaml-test-suite with very strict
tests that check for explicit document start/end markers.
So the following tests need to be skipped for now:
27NA 35KP 4V8U 9KAX P76L
The problematic case was that it created the following YAML:
But you would need
...
after `foo' here. Only when quoted you can leave out the end marker:In YAML 1.2 you always have to add the end marker, so I think it's a good thing.
But I know that the end marker also gets added to cases where it is not needed. Maybe I can have a look into that.