Enable a-posteriori versioning, or numberless versioning
Current With_version
data encoding requires that the encoding has been thought from the beginning as a versioned encoding. It is thus not usable to handle an unforeseen change in a data encoding, like renaming/adding/deprecating/removing a field for example.
It would be useful to have a dedicated mechanism for such situation.
a few thought about that:
-
Field renaming: the previous version of a renamed field should be decodable, but encoding should only use the new name. Such encoding facility could be an optional parameter for the field encoding, where one can specify the legacy name(s).
-
adding a field is probably already handled by dft fields ?
-
deprecating/removing is probably a matter of issuing the right warning, ignoring the field at decoding, and making the field optional in the new encoding. Special care is probably needed to warn somewhere that it will not be compatible with older decoders.