Skip to content

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

Merged
lihaoyi-databricks merged 12 commits intomasterfrom
no-octal-literal
Sep 8, 2023
Merged

Avoid generating unquoted octal-like strings to avoid parser bugs#183
lihaoyi-databricks merged 12 commits intomasterfrom
no-octal-literal

Conversation

@lihaoyi-databricks
Copy link
Copy Markdown
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
@stephenamar-db stephenamar-db deleted the no-octal-literal branch April 18, 2025 06:40
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