Expand description
Loads a model/overrides document together with its local imports.
The document formats themselves (see super::model and
super::overrides) know nothing about imports beyond carrying an
imports: Vec<PathBuf> field — resolving them, rejecting anything
unsafe (remote, recursive, or role-mismatched), and merging them with
deterministic root-wins semantics is this module’s job.
See the design doc’s “### Imports” section for the merge rules this
implements: imported files are always kind: overrides, resolve
relative to the importing file, and cannot themselves import; two
imports may never define the same configuration path; the root
document may freely override anything an import defines; maps merge by
key while lists replace wholesale.
Structs§
- Config
Loader - Loads a root synthetic-data document plus its resolved local imports,
producing a single
SyntheticFileready for compilation.
Functions§
- merge_
yaml - Merges a root document’s imports (in declaration order, with path-level collision detection) and then merges the root document itself on top with no collision checking — the root always wins.