Next: , Previous: , Up: The Object model of ASDF   [Contents][Index]


7.4 Functions

Function: version-satisfies version version-spec

Does version satisfy the version-spec. A generic function. ASDF provides built-in methods for version being a component or string. version-spec should be a string. If it’s a component, its version is extracted as a string before further processing.

A version string satisfies the version-spec if after parsing, the former is no older than the latter. Therefore "1.9.1", "1.9.2" and "1.10" all satisfy "1.9.1", but "1.8.4" or "1.9" do not. For more information about how version-satisfies parses and interprets version strings and specifications, see Version specifiers and Common attributes of components.

Note that in versions of ASDF prior to 3.0.1, including the entire ASDF 1 and ASDF 2 series, version-satisfies would also require that the version and the version-spec have the same major version number (the first integer in the list); if the major version differed, the version would be considered as not matching the spec. But that feature was not documented, therefore presumably not relied upon, whereas it was a nuisance to several users. Starting with ASDF 3.0.1, version-satisfies does not treat the major version number specially, and returns T simply if the first argument designates a version that isn’t older than the one specified as a second argument. If needs be, the (:version ...) syntax for specifying dependencies could be in the future extended to specify an exclusive upper bound for compatible versions as well as an inclusive lower bound.