Proposal: Not using the optolith version number for version.
Neintonine opened this issue · 3 comments
One thing I noticed, while developing my own version next to the optolith, is that I can't change the version number in any way, since otherwise my characters won't show up in my normal versions heroes list and I can't share it, the program will deny it since its not on the same version or older, even if I never changed anything about the schema.
My proposal is, instead of saving the current optolith version, we save a integer, that is counted up, every time a new optolith version comes out, that changes the schema. This should prevent such issues, when you don't change the schema and additionally we can create migrations, so we can easily convert a hero up and down, if requested.
This is a good idea, but I think, I would keep SemVer in order to better communicate schema change “severity” through the versioning scheme. Because, for example, additions would not necessarily be a breaking change, since I want to use "additionalProperties": true
on object types to require less breaking changes. (Although I need to update optolith-tsjsonschemamd
via elyukai/optolith-tsjsonschemamd#3 for this, forgot about that.) Also simple fixes or updates to documentation or whatever can be introduced more easily IMO. So in the end you’d then check for the MAJOR version – which keeps your idea of a dedicated schema version.
That sounds like a very good idea.
Implemented in 39ddc26. Unknown properties are now ignored (elyukai/optolith-tsjsonschemamd#3, d85bbd9).