-
Notifications
You must be signed in to change notification settings - Fork 5
Description
The dls-plc module is an example of why this is needed. It's builder.py translation to dls-plc.ibek.support.yaml comes out at 12000 lines.
This is because there are many arguments relating to interlocks that are repeated in each of the definitions.
If instead we could write those arguments down once and include them then the file would be much more maintainable. We can use yaml references for this purpose. https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd
Thus the argument list would become List[Arg | List[Arg]]
And the definitions list would maybe look like:
thing:
args: &thing_args
- type: str
name: P
- type: str
name: Q
other_thing:
args:
- *thing_args
- type: str
name: R
Although maybe we should have a separate top level dictionary item as a peer to 'defs' that declares shared argument lists. Also need to think about whether other things like database declarations and startup script lines would also want to support this kind of thing.