The tree is loaded from files in etc/gem/layout-tree.d. All files found under that directory are concatenated into a single YAML document, that is then turned into C++ objects with loader.
Concatenation was the only option to make YAML anchors work across multiple files. In theory, it could have been implemented using include statements like Gitlab does:
*include: file name
Unfortunately, yaml-cpp doesn't expose the relevant hooks.
See the documentation of
load() for more details.
Fixes #97 (closed)
How Has This Been Tested?
- All files are found correctly and symbolic links are resolved as needed
- Files are concatenated correctly
If provided with some real data, I can add example files and a unit test.
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
My code follows the code style of this project.
My change requires a change to the documentation.
I have updated the documentation accordingly.
I have read the CONTRIBUTING document.
I have added tests to cover my changes.
All new and existing tests passed.