Jump to: navigation, search

Version Designator (Buckminster)

< To: Buckminster Project
A Version Designator is "a pointer to one, or a range of versions". As an example, a version designator for all versions from 1.2.3 inclusive to 4.5.6 inclusive is written as: [1.2.3, 4.5.6].

The Version Designator is a string where each plain version in the range must follow the syntax as determined by the Buckminster Version Type.

A plain version string may not contain the characters '/', '#', or '@' as the precense of these indicates that it is a Version Selector and not a plain version, as in a version string like "4.5.0". The version string is further restricted to not include the version designator delimiters '[' ']' '(' ')' or ','.

Normally, the version designator would be something simple like "4.5 or greater" which probably is sufficient in some cases. But since most things in the world of software is anything but straightforward we need syntax capable of describing the complicated cases. Specifically, the version designator can denote a range. The characters '[' and ']' are used to denote an inclusive range and the characters '(' and ')' will denote an exclusive range. Here are some examples:

Range Examples
Example Predicate
[1.2.3, 4.5.6) 1.2.3 <= x < 4.5.6
[1.2.3, 4.5.6] 1.2.3 <= x <= 4.5.6
(1.2.3, 4.5.6) 1.2.3 < x < 4.5.6
(1.2.3, 4.5.6] 1.2.3 < x <= 4.5.6
4.5 4.5 <= x
[4.5,4.5] 4.5 <= x <= 4.5


Thus if you want to state a specific version such as "4.5" you need to state it as [4.5,4.5]. If you only specify "4.5" this means "4.5 or greater". If no range is specified at all, this means "any version".

Which character to use for Inclusive and Exclusive?
If you have a hard time remembering which one of '(' or '\[' is inclusive and which is exclusive, it may help you to remember that if you bring ']' and '[' back to back they will form an 'I' for 'Inclusive', whereas ')' and '(' will form sort of an 'X' for 'eXclusive'.