Open nanonyme opened 2 years ago
This makes documentable defaults basically impossible unless I'm missing something.
Currently plugins (elements or sources) document themselves using reStructuredText in the module level docstring, e.g.: https://github.com/apache/buildstream-plugins/blob/master/src/buildstream_plugins/sources/git.py#L27
The difference is only that plugin level defaults are not composited for source plugins. Element plugins have been using this file as a convenience at composition time, which is indeed nice and simple.
We originally used this approach of plugin level yaml defaults for the sake of build elements especially, since they are mostly composed of yaml configuration (different build elements only differ in their yaml defaults) - while this is much less useful for source plugins, it could still be useful.
There are many quite complex source plugins at this point. It seems that it's not supported to have configs with plugin YAML, only project YAML or element YAML. This makes documentable defaults basically impossible unless I'm missing something. Let's ensure source plugins behave same way as build element plugins with regards to configs.