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

Different boolean represenatations of the same value treated differently #334

Closed
nresare opened this issue Jan 11, 2024 · 0 comments · Fixed by #335
Closed

Different boolean represenatations of the same value treated differently #334

nresare opened this issue Jan 11, 2024 · 0 comments · Fixed by #335

Comments

@nresare
Copy link
Contributor

nresare commented Jan 11, 2024

yaml treats a whole bunch of different tokens as a boolean value. For example both true and True has the semantic meaning of boolean true. However, when comparing two files with differing ways to encode the same boolean value.

Expected outcome: different encodings of the same boolean value should be treated the same

Actual outcome: only boolean values with identical textual representation are treated the same

See for example the following example:

$ cat left.yaml                    
---
key: True
$ cat right.yaml                   
---
key: true
$ dyff between left.yaml right.yaml
     _        __  __
   _| |_   _ / _|/ _|  between left.yaml
 / _' | | | | |_| |_       and right.yaml
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned one difference
        |___/

key
  ± value change
    - True
    + true
nresare added a commit to nresare/dyff that referenced this issue Jan 11, 2024
Add special logic to ensure that the various supported boolean value
representations are treated the same. Closes homeport#334
HeavyWombat pushed a commit that referenced this issue Jan 14, 2024
Add special logic to ensure that the various supported boolean value
representations are treated the same. Closes #334
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 a pull request may close this issue.

1 participant