Skip to content

[core, lua, sql] YAML as static data source; enums codegen; schema validation#10331

Merged
WinterSolstice8 merged 1 commit into
LandSandBoat:basefrom
sruon:yaml_status_effects
Jun 16, 2026
Merged

[core, lua, sql] YAML as static data source; enums codegen; schema validation#10331
WinterSolstice8 merged 1 commit into
LandSandBoat:basefrom
sruon:yaml_status_effects

Conversation

@sruon

@sruon sruon commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

  • Introduce YAML (rapidyaml) as the source of truth for static data (replacing SQLs) and enums (replacing hand-written enums in lua/C++)
  • Introduce JSON schemas attached to each YAML, enabling first class auto-completion and validation right in the IDE and CI
  • Introduce machinery to codegen enums and data loading PODs from said YAMLs
  • Wires CI to validate YAMLs on PRs
  • Migrates status effects

See this Gist for rationale and design
See this repository for an example of codegen'd files

I'll need to cleanup the existing C++ enums separately, the PR would be way too noisy otherwise.

If you can't build xi_map after this is merged, you most likely need to update your python dependencies

pip install -r tools/requirements.txt

Steps to test these changes

Run xi_map, see

[data] status_effects 668 entries loaded in 10ms

@sruon sruon force-pushed the yaml_status_effects branch from 44fe186 to 2600510 Compare June 16, 2026 06:16
@sruon sruon force-pushed the yaml_status_effects branch from 2600510 to 6f40ea8 Compare June 16, 2026 06:32
@WinterSolstice8 WinterSolstice8 merged commit aeebca3 into LandSandBoat:base Jun 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants