feat: includes as property - #546
Conversation
Signed-off-by: Sebastian Schleemilch <sebastian.schleemilch@bmw.de>
f394831 to
68843de
Compare
|
Happiness is reason enough. Looks ok for me. |
|
I have no objections to the idea, but we should better have a companion PR extending https://github.com/COVESA/vehicle_signal_specification/blob/master/docs-gen/content/rule_set/includes.md We should also discuss when to use the variant in the standard catalog. Like do we prefer the new variant over the old? If so do we want to only accept the new variant for std catalog PRs. Or possibly also change it for existing usecases. I actually do not know if there are any corner cases where the old syntax must be used as the old does not suffice. As I understand from the change it is possible also for the new syntax to have relative search paths like |
I can create a companion PR. Personally I would switch the standard catalog to using this mechanism so that such an important behavior is not encoded in comments of the holding filetype (YAML). Of course there is always the possibility to drop the support of the inline comments at some point and what would also be possible is to offer a converter. The only corner case I can think of that the new syntax does not support is |
Signed-off-by: Sebastian Schleemilch <sebastian.schleemilch@bmw.de>
|
Does anyone think we would need a magic toplevel property to hold includes as well? |
As long as we only support a single top node ( |
|
MoM:
|
Should we vote which one to use and decline this one if everyone wants to stick to the old one? |
About
The current VSS include mechanism that is based on comments was always bothering me.
That's why this is an alternative backwards compatible way of defining includes.
type: branchnodes can define a list of files to include as children.The syntax of the file and all include dir searching logic stays the same.
However, I added support for defining includes without the extension and we are searching for
vspecandyamlextensions if not defined. This makes the includes less cluttering.Also, the
includesproperty will be stripped after extracting the include definitions.Therefore this has no impact on later stages like exporters, models and so on.
Both definitions can be mixed without problems.
Example
A.vspec
B.vspec
C.vspec
Result: