Closed pbelanger-avid closed 1 year ago
Note: currently this does not detect or handle recursive includes. (eg. a.yaml
including itself)
The second commit adds a second "sequence include" form, $[include]
, that can be used to dynamically populate sequences (such as the plugin list in my particular use case) with YAML elements pulled from individual documents in the included file.
This commit adds support for a special
$include
keyword in the YAML preprocessor. This new keyword is similar to the existing$eval
keyword and allows building therobot.model.yaml
up from multiple separate files.$include can process both absolute filenames as well as relative filenames, which are interpreted relative to the file currently being processed.
The included document is also processed by the YAML preprocessor, and so can include nested
$include
s and$eval
s.This commit also updates the documentation and tests.
Some usage examples: