You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2021/09/09 14:25:29 UTC

[GitHub] [buildstream] gtristan edited a comment on issue #1495: _yaml.pyx deletes comments when dumping using recent versions of ruamel.yaml

gtristan edited a comment on issue #1495:
URL: https://github.com/apache/buildstream/issues/1495#issuecomment-916147106


   > I also consider it wrong if ruamel.yaml normalizes strings to booleans
   
   Its not completely clear to me, `ruamel.yaml` does not normalize *strings* per se, so long as they are quoted or use a YAML syntax which clearly denotes the scalar value to be a string, it does however introduce changes to valid YAML when roundtripping, so I would say that the roundtripping is imperfect in the sense that some user preferences are lost.
   
   > Note if BuildStream converts string "True" to boolean and expects ruamel.yaml not to dump it as true, then the bug is clearly in BuildStream.
   
   BuildStream forces all scalars to be treated as strings (both at load and save time) and this works around normalizations while also ensuring that things like version numbers can be written plainly without quotes or complex YAML syntaxes.
   
   To refer back to the upstream wontfix issue, we can clearly see that plain usage of `ruamel.yaml` does introduce changes to boolean and null scalar values: https://sourceforge.net/p/ruamel-yaml/tickets/390/#c65a
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org