Remnants of YAML 1.1 Spec in YAML 1.2

Open
#1,198 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, yaml

Research direction

Start with the boolean resolution code in src/convert.cpp at the linked lines and compare its accepted spellings with the YAML 1.2 boolean rules cited in the issue. Check the related tests for boolean conversion and update them to cover the expected spellings. Done means YAML 1.2 true/false variants resolve as booleans while the extra YAML 1.1 spellings do not.

Written by the indexing model from the issue text.

Description

Hello!

I believe there may be an error in how the current codebase handles true/false value resolution for YAML 1.2. The lines in question are linked below:
https://github.com/jbeder/yaml-cpp/blob/0e6e28d1a38224fc8172fae0109ea7f673c096db/src/convert.cpp#L49-L55

According to this section of the YAML 1.2 guide:
https://yaml.org/spec/1.2-old/spec.html#id2805071

Only variants on "true"/"false" in the YAML file should resolve to the booleans. However, the above-linked code also resolves three other ways to represent booleans outside of 1.2 specs but was present in 1.1 specs.

Dominant language
C++
Stars
6.1k
Forks
2.2k
Avg merge
22h 2m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jbeder/yaml-cpp

All issues in jbeder/yaml-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.