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

Added option to quote YAML 1.1 boolean strings #738

Closed
wants to merge 6 commits into from
Closed

Added option to quote YAML 1.1 boolean strings #738

wants to merge 6 commits into from

Conversation

LaXiS96
Copy link
Contributor

@LaXiS96 LaXiS96 commented Nov 7, 2022

This pull request addresses issue #737.
I added an optional parameter to SerializerBuilder.WithQuotingNecessaryStrings to opt into treating YAML 1.1 boolean strings like "Yes", "no", "ON", "Off" as special strings that need to be quoted. Specification is here.
I also refactored the special strings regex to be compiled once at the construction of TypeAssigningEventEmitter.

@perlpunk
Copy link

perlpunk commented Nov 8, 2022

In my opinion such an option just for booleans doesn't make much sense. Not only booleans have changed between YAML 1.1 and 1.2, but also numbers. Have a look here for a compact comparison: https://perlpunk.github.io/yaml-test-schema/schemas.html
So you should take into account all the differences.

@LaXiS96
Copy link
Contributor Author

LaXiS96 commented Nov 8, 2022

Thank you @perlpunk, I have updated the code to hopefully include all YAML 1.1 scalar styles.

@aaubry aaubry force-pushed the master branch 8 times, most recently from a0f8359 to 78b1ab3 Compare December 2, 2022 22:39
@EdwardCooke
Copy link
Collaborator

I’m going to review this in the next few days so we can get it moving through. In the meantime, you’ll need to rebase from master to fix the merge conflicts.

@LaXiS96
Copy link
Contributor Author

LaXiS96 commented Jan 12, 2023

I merged my fork with upstream, thank you for your time!

@EdwardCooke
Copy link
Collaborator

The build hit the random bug during build. Can you push up another commit so it attempts a build again?

@LaXiS96
Copy link
Contributor Author

LaXiS96 commented Jan 13, 2023

To be fair, I noticed all previous builds ended with the same ResolveVersion error, I haven't seen any build succeed.
Is there anything I can do on my side to ensure it builds?

@EdwardCooke
Copy link
Collaborator

Instead of using master as your branch, try using a different branch name. It may be getting confused about having 2 master branches.

@LaXiS96 LaXiS96 deleted the branch aaubry:master January 14, 2023 14:09
@LaXiS96 LaXiS96 closed this Jan 14, 2023
@LaXiS96 LaXiS96 deleted the master branch January 14, 2023 14:09
@LaXiS96
Copy link
Contributor Author

LaXiS96 commented Jan 14, 2023

I renamed my main branch and had to open a new pull request (#767), which did build successfully.

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.

None yet

3 participants