Skip to content

[Yaml] Fix parsing multidimensional inline collections #39013

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

Closed

Conversation

simonberger
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #39011
License MIT

Multidimensional yaml inline collections spread over multiple lines could not be parsed.
I could not find new problems fixing it that way. Also the thrown exceptions for incomplete collections are the same.

@simonberger simonberger force-pushed the fix_parsing_yaml_collections branch from d9ec712 to 77fc10e Compare November 6, 2020 04:40
@jderusse jderusse changed the title Fix multidimensional inline yaml collections [Yaml] Fix multidimensional inline yaml collections Nov 6, 2020
@simonberger simonberger changed the title [Yaml] Fix multidimensional inline yaml collections [Yaml] Fix multidimensional inline collections Nov 6, 2020
@simonberger simonberger changed the title [Yaml] Fix multidimensional inline collections [Yaml] Fix parsing multidimensional inline collections Nov 6, 2020
@simonberger
Copy link
Contributor Author

simonberger commented Nov 11, 2020

I just realized this could break when "[" or "]" are appearing in strings. On the other hand this issue isn't new the following yaml isn't parsable in the master as well:

[
"]"
]

While searching through the issues if this is known I found this old pull request #33763 which includes the exact same fix 😄 . The problem I have here is mentioned as well and not fixed yet.

@xabbuh are you planning to fix the issues in your PR? Shall I close here?

@xabbuh
Copy link
Member

xabbuh commented Nov 11, 2020

I hope to be able to work on my PR on Friday. I will keep you updated if I make any progress there.

@xabbuh
Copy link
Member

xabbuh commented Nov 15, 2020

Thank you for working on this @simonberger. I have added your test case to #33763.

@xabbuh xabbuh closed this Nov 15, 2020
@simonberger simonberger deleted the fix_parsing_yaml_collections branch November 15, 2020 19:25
fabpot added a commit that referenced this pull request Nov 19, 2020
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix lexing nested sequences/mappings

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #34805, #37788, #37876, #39011, #39013, #39064
| License       | MIT
| Doc PR        |

Commits
-------

4c15f80 fix lexing nested sequences/mappings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants