Add save file format compatibility test #2319
Labels
T-Testing
Involves the testing suite - unit and integration tests, also benchmarks.
Z-Developer Experience
This issue seeks to make life easier for developers writing Scenarios or other Swarm code.
Z-Feature
A new feature to be added to the game.
Is your feature request related to a problem? Please describe.
The change in #2312 mistakenly broke scenario "save" (best score) compatibility.
Luckily, it was found (and soon fixed in #2318) promptly, but a change like this should not get past CI.
Describe the solution you'd like
We should test that the best scores that a player has already saved can be parsed in CI.
Additive changes can extend the file, but a new file must be added once we have any required fields.
In the case of #2312:
Describe alternatives you've considered
Unit tests for individual types would be nice, but they would not cover my use case. I want to make code refactorings fearlessly and not worry that I will break compatibility.
Additional context
I thought a bit about how we would maintain the files, and I think it would work like this:
version
tag to the top of the format and parse the rest accordinglyThis may seem like a lot of pointless work for one accidental change, which could be undone, but:
The text was updated successfully, but these errors were encountered: