Skip to content
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

Avoid generating unquoted octal-like strings to avoid parser bugs #183

Merged
merged 12 commits into from
Sep 8, 2023

Conversation

lihaoyi-databricks
Copy link
Contributor

@lihaoyi-databricks lihaoyi-databricks commented Sep 7, 2023

Not every YAML parser distinguishes between unquoted string literals the same way:

This PR forces strings like 088579281390 to be rendered as quoted '088579281390'. While this is not strictly necessary, there are several YAML parsers which mis-handle this kind of output, and so we ensure things are quoted to avoid triggering this edge case.

Added a unit test that on master fails due to generation of non-quoted octal-like strings, and on this PR passes with all strings quoted

@lihaoyi-databricks lihaoyi-databricks changed the title Add --yaml-no-unquoted-string-literals flag to work around parser bugs Avoid generating unquoted octal-like strings to avoid parser bugs Sep 7, 2023
@lihaoyi-databricks lihaoyi-databricks merged commit 4109fc6 into master Sep 8, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants