Builder: publish YAML schema files for config
gftools builder shouldn't run if build/config include parameters which are misspelled or not valid. Bonus points for suggesting fixes to spelling mistakes e.g buildotf is not a valid parameter. Did you mean buildOTF?
@eliheuer don't know if you'd like to work on this? we can pair on it if you'd like? This isn't urgent but it's definitely something we'll need. Perhaps we'll tackle it once you start using the builder.
That would be great! I have a meeting Friday I'm busy getting ready for but I'll work on this after that.
@m4rc1e I made a PR for this here: https://github.com/googlefonts/gftools/pull/356
I spent some time reviewing Python error handling over the weekend, so pairing on this would be helpful if you have time. Thanks!
Maybe related: Would it be possible to supply YAML schema files for the config yaml file? Something like https://github.com/googlefonts/gftools/blob/main/Lib/gftools/builder/schema.py but in yaml format itself. That would simplify editing config.yaml in editors which use the schema, e.g. VSCode.
@jenskutilek Maybe that would be something the Google Fonts Unified Repository could include? https://github.com/googlefonts/Unified-Font-Repository
It could even reside in a central location, VSCode can take a URL for yaml schemas used for validation:
https://gist.github.com/jenskutilek/42415ea048896a4cde81e5e5f9147b7b#file-settings-json-L58-L60
{
"yaml.schemas": {
"https://gist.githubusercontent.com/jenskutilek/1f93723fd3aed89810d61d5d6934b518/raw/6bd5f08614ad3368c8f3a66e86dd91dfd107380d/fontfabrik-v1.yaml": "*.fofa.yaml"
}
}
We've kind of done this using strictyaml, although now under builder2 build config files can be a lot more flexible.