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)
If provided with some real data, I can add example files and a unit test.