Header menu logo Nao

VersionRef Module

Helpers for version-qualified references of the form "name@version". Used to look up a specific version of a tool or agent while remaining backward compatible with plain, unversioned "name" references.

Functions and values

Function or value Description

VersionRef.matches requested actual

Full Usage: VersionRef.matches requested actual

Parameters:
    requested : string option
    actual : string option

Returns: bool

Whether an actual version satisfies a requested version. A request of None matches any actual version (name-only lookup).

requested : string option
actual : string option
Returns: bool

VersionRef.parse reference

Full Usage: VersionRef.parse reference

Parameters:
    reference : string

Returns: string * string option

Parse a possibly version-qualified reference "name@version" into its (name, version option) parts. "name" => (name, None).

reference : string
Returns: string * string option

Type something to start searching.