Strict YAML is interesting

It seems we could keep only the good parts of YAML after all, and put an end to all those terrible bugs caused by automagic typing. 🤔

@jjardon possibly, yes.

It might be worth trying it out at the very least.

Especially since Buildstream (at least last I looked) has a lot of code to handle validation of the options, their types, etc…

The builtin validation facilities in StrictYAML might make this simpler.

@jjardon also, since everything is a string in StrictYAML, it might allow us to do away with the ugly `: |\n`constructs and quoting we have to put when values start with a "%" or other "niceties".

@jjardon only problem (apart from actually writing the code obviously) might be speed:

Given how many files Buildstream often has to read at startup, and how the parsing seems to occupy a big chunk of startup time, if StrictYAML is worse than Ruamel (iirc that's what Builstream currently uses?) that could be a bad regression. 😕

@mathieu @jjardon so you were trying to learn Rust I heard Mathieu...

I think ruamel is mostly C where's strictyaml is just python, I don't think the performance hit will be acceptable at this stage.

@jjardon @mathieu I'm not sure – aren't you using refs/node anchors? These two, while can be confusing, are actually useful in YAML, but removed from StrictYAML.

@mathieu as long it has Yaml in the name, it will only cause more confusion.

No project is going to say "we use yaml for project conf, but not the one that everyone else does, its this one which is designed to reject 90% of the things you will first try, thinking you are familiar with it.

Sign in to participate in the conversation
mstdn est une instance lancée et administrée par des sysadmins expérimentés avec comme objectif qu'elle accueille des dizaines de milliers d'utilisateurs de manière pérenne. Plus d'informations dans ce billet de blog :