Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Version Type (Buckminster)
< To: Buckminster Project
Definition
A Version Type is a class that is used to parse and understand a plain version; "a pointer to a specific version". More specifically, a Version Type will be asked to parse and compare the text between the delimiters in a Version Designator.
Description
Here is an example:
Field | Value |
---|---|
VersionDesignator: | [AndreaDoria-47.2,Titanic-27b] |
VersionType: | ShipwreckFamilyVersionType |
Here, the ShipwreckFamilyVersionType would be handed the strings "AndreaDoria-47.2" and "Titanic-27b" for parsing and comparison.
OSGi Version Type
Buckminster has an implementation of a version type that uses a variant of OSGi version strings.
version ::= major( '.' minor ( '.' micro ( '.' qualifier )? )? )? major ::= number minor ::= number micro ::= number qualifier ::= ( alphanum | '_' | '-' )+ |
The alphanumerical qualifier has no specific syntax or semantics. The default OSGi type compares and orders the qualifier lexically. If you need something different, like treating 1.0.0 as being later than 1.0.0.rc1, but earlier than 1.0.0.sp1 (rc=release candidate, and sp=service pack), you need to implement a new Version Type.
New Version Types
New version types can be added using the extension-point org.eclipse.buckminster.core.versionTypes.
As an example, if you have components that have version names that are alphanumeric, perhaps following some sort of naming theme it is the responsability of the version type class to compare and determine their order. There is no way to automatically organize versions such as "Wasa", "Titanic", and "AndreaDoria".
A new Version Type is also needed if you are plagued by version numbering that jumps back and forth - perhaps between marketing driven names, and something more technical - i.e the "98" version may be superseeded by the "2000" version which is superseeded by 'series 6' (commonly refered to as version 6).
Sometimes, flukes make organizations release things out of order. And a version 5.3.10 may be considered "newer and better" than a 6.0.
Naturally it is best ot have "all versions of your ducks in a row", but sometimes it is not worth the problem of fixing past mistakes and you need to construct a Version Type class to handle the parsing and comparison.