Encode Metadata `added`<-`deprecated`<-`removed` invariants
Currently, Metadata just has three Options, which technically could all be None or Some independently
I want to change this so that the invariant of "deprecated implies added" and "removed implies deprecated" is encoded in an enum, possibly something like this;
enum Versioning {
None,
WithAdded {
added: MatrixVersion,
},
WithDeprecated {
added: MatrixVersion,
deprecated: MatrixVersion,
},
WithRemoved {
added: MatrixVersion,
deprecated: MatrixVersion,
removed: MatrixVersion,
}
}
The idea sounds good, but the variant names seem weird. How about Unstable, Stable, Deprecated, Removed?
While working on this, I realised it was a bit weird to not include the *_path variables into this as well, considering that they fall almost under the same invariant.
Should I do that as well?
Now that we have VersionHistory with private fields, do we still need this?
This has basically been enforced by these lines, yeah.