|
Porytiles
|
Resolves the invocation's metatile attribute schema: fetch config, scan, infer, reconcile. More...
#include <metatile_attribute_schema_resolver.hpp>
Public Member Functions | |
| MetatileAttributeSchemaResolver (std::filesystem::path project_root, gsl::not_null< const InfraConfig * > config, gsl::not_null< const TextFormatter * > format, gsl::not_null< const UserDiagnostics * > diag) | |
| ChainableResult< LoadedMetatileAttributeSchema > | resolve (const std::string &tileset_name) const |
| Resolves the metatile attribute schema for the invocation. | |
Resolves the invocation's metatile attribute schema: fetch config, scan, infer, reconcile.
This is a thin infra-layer orchestrator over four pieces, in order:
Each step emits its own non-fatal diagnostics directly. The scan emits under the "metatile-attribute-inference" tag, and the reconciler under "metatile-attribute-schema". Inference itself emits nothing: facts it cannot settle travel as conflict records on the candidate sets, and the reconciler turns each one fatal unless an override speaks to it. Its one advisory output, the list of METATILE_ATTR_ prefixed defines whose spelling it has no rule for, is warned about here between steps 3 and 4, under the scan's tag and before any reconciliation error can end the run. Emitting at the point of detection means anything decided before a later fatal still reaches the user. The caller supplies the filtered sink, so the non-fatal diagnostics respect the user's diagnostic include/exclude patterns.
Definition at line 39 of file metatile_attribute_schema_resolver.hpp.
| porytiles::MetatileAttributeSchemaResolver::MetatileAttributeSchemaResolver | ( | std::filesystem::path | project_root, |
| gsl::not_null< const InfraConfig * > | config, | ||
| gsl::not_null< const TextFormatter * > | format, | ||
| gsl::not_null< const UserDiagnostics * > | diag | ||
| ) |
Definition at line 13 of file metatile_attribute_schema_resolver.cpp.
| ChainableResult< LoadedMetatileAttributeSchema > porytiles::MetatileAttributeSchemaResolver::resolve | ( | const std::string & | tileset_name | ) | const |
Resolves the metatile attribute schema for the invocation.
The result is invocation-global: the attribute layout is one-per-project, so every tileset a command touches shares the schema resolved here. The tileset name parameter is the YAML config scope key (a per-tileset config.yaml can technically answer the fieldmap keys; the values are documented as project-level).
| tileset_name | The command's target tileset, used as the config scope. |
Definition at line 23 of file metatile_attribute_schema_resolver.cpp.