-
Notifications
You must be signed in to change notification settings - Fork 2
Description
In the extension declaration prototype in #38 tag versions are not explicitly handled in any way. That is, a full tag string is given, including the -X.Y.Z
version extension, like foo-1.0.0
. The extension then only handles precisely the versioned tag foo-1.0.0
.
In practice it will be useful for the same extension to handle multiple versions of the same tag/schema, especially if there are only subtle differences between versions. So it would be nice to be able to register the tag name without the version, plus an array of tag versions supported by the extension. This gives maximum flexibility: The same extension can handle multiple tag versions, or potentially the option for any tag version (potentially risky). If two versions of a schema are wildly different they could also be handled by separate extensions.
This should keep in mind the standard's recommendation:
If while reading a file an unknown version number is encountered the library should warn the user and return a structure that preserves the version information but does not deserialize the versioned object.
For example if the foo-1.1.0 tag is known and a file contains a foo-1.0.0 tag the unknown 1.0.0 version should not be handled like a foo-1.1.0 object. The same is true if the file contains a newer but still unknown version (for example foo-2.0.0). This behavior applies to tags that differ by any element (major, minor or patch) of the version number.