The cl-semver Reference Manual
Table of Contents
The cl-semver Reference Manual
This is the cl-semver Reference Manual,
generated automatically by Declt version 3.0 "Montgomery Scott"
on Tue Dec 22 12:47:34 2020 GMT+0.
1 Introduction
CL-SEMVER
cl-semver is a Common Lisp implementation of the Semantic Versioning Specification (http://semver.org/
Functions
%disable-version-syntax nil
Internal function used to restore previous readtable.
%enable-version-syntax nil
Internal function used to enable reader syntax and store current
readtable on stack.
make-semantic-version (major minor patch &optional pre-release build)
Creates a semantic version
print-version (version &optional stream)
Prints a version to a stream
print-version-to-string (version)
Prints a version to a string
read-version-from-string (string &optional (class (quote semantic-version)))
Parses a semantic version from a string
version<= (version1 version2)
Version less or equal comparison
version> (version1 version2)
Version greater than comparison
version>= (version1 version2)
Version greater or equal comparison
Macros
disable-version-syntax
Restore readtable which was active before last call to
ENABLE-VERSION-SYNTAX. If there was no such call, the standard
readtable is used.
enable-version-syntax
Enable version reader syntax.
Generic-Functions
version/=
Version distinct comparison
version/==
Version shallow distinct comparison
version<
Version less than comparison
version=
Version equality comparison
version==
Version shallow equality comparison
Slot-Accessors
version-build
The build version number
(setf version-build)
The build version number
version-major
The major version number
(setf version-major)
The major version number
version-minor
The minor version number
(setf version-minor)
The minor version number
version-patch
The patch (or micro) version number
(setf version-patch)
The patch (or micro) version number
version-pre-release
The pre release version number
(setf version-pre-release)
The pre release version number
version-pre-release-identifiers
The pre release segment, broken into a list of strings and integers.
(setf version-pre-release-identifiers)
The pre release segment, broken into a list of strings and integers.
Variables
Classes
semantic-version
Instances represent a full version according to the semantic version specs (version 2.0.0-rc1 of the spec). http://semver.org/ . The main features of this class are validation and version comparison.
version
Library version
Conditions
Constants
Readtables
semver-syntax
The named readtable implementing the specialized semver reader using #v
.
You can use the #v syntax by doing:
(named-readtables:in-readtable cl-semver:semver-syntax)
2 Systems
The main system appears first, followed by any subsystem dependency.
2.1 cl-semver
- Author
Mariano Montone
- License
MIT
- Description
Semantic Version implementation
- Dependencies
- alexandria
- esrap
- named-readtables
- Source
cl-semver.asd (file)
- Components
-
3 Files
Files are sorted by type and then listed depth-first from the systems
components trees.
3.1 Lisp
3.1.1 cl-semver.asd
- Location
cl-semver.asd
- Systems
cl-semver (system)
3.1.2 cl-semver/package.lisp
- Parent
cl-semver (system)
- Location
package.lisp
- Packages
cl-semver
3.1.3 cl-semver/semver.lisp
- Dependency
package.lisp (file)
- Parent
cl-semver (system)
- Location
semver.lisp
- Exported Definitions
-
- Internal Definitions
-
4 Packages
Packages are listed by definition order.
4.1 cl-semver
cl-semver is a Common Lisp implementation of the Semantic Versioning Specification (http://semver.org/
- Source
package.lisp (file)
- Nickname
semver
- Use List
- editor-hints.named-readtables
- esrap
- common-lisp
- Exported Definitions
-
- Internal Definitions
-
5 Definitions
Definitions are sorted by export status, category, package, and then by
lexicographic order.
5.1 Exported definitions
5.1.1 Macros
- Macro: disable-version-syntax ()
-
Restore readtable which was active before last call to
ENABLE-VERSION-SYNTAX. If there was no such call, the standard
readtable is used.
- Package
cl-semver
- Source
semver.lisp (file)
- Macro: enable-version-syntax ()
-
Enable version reader syntax.
- Package
cl-semver
- Source
semver.lisp (file)
5.1.2 Functions
- Function: make-semantic-version MAJOR MINOR PATCH &optional PRE-RELEASE BUILD
-
Creates a semantic version
- Package
cl-semver
- Source
semver.lisp (file)
- Function: print-version VERSION &optional STREAM
-
Prints a version to a stream
- Package
cl-semver
- Source
semver.lisp (file)
- Function: print-version-to-string VERSION
-
Prints a version to a string
- Package
cl-semver
- Source
semver.lisp (file)
- Function: read-version-from-string STRING
-
Parses a semantic version from a string
- Package
cl-semver
- Source
semver.lisp (file)
- Function: version-string-valid-p STRING
-
Validate a version string
- Package
cl-semver
- Source
semver.lisp (file)
- Function: version<= VERSION1 VERSION2
-
Version less or equal comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Function: version> VERSION1 VERSION2
-
Version greater than comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Function: version>= VERSION1 VERSION2
-
Version greater or equal comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Function: versionp OBJECT
-
- Package
cl-semver
- Source
semver.lisp (file)
5.1.3 Generic functions
- Generic Function: version-build OBJECT
-
- Generic Function: (setf version-build) NEW-VALUE OBJECT
-
- Package
cl-semver
- Methods
- Method: version-build (SEMANTIC-VERSION semantic-version)
-
- Method: (setf version-build) NEW-VALUE (SEMANTIC-VERSION semantic-version)
-
The build version number
- Source
semver.lisp (file)
- Generic Function: version-major OBJECT
-
- Generic Function: (setf version-major) NEW-VALUE OBJECT
-
- Package
cl-semver
- Methods
- Method: version-major (SEMANTIC-VERSION semantic-version)
-
- Method: (setf version-major) NEW-VALUE (SEMANTIC-VERSION semantic-version)
-
The major version number
- Source
semver.lisp (file)
- Generic Function: version-minor OBJECT
-
- Generic Function: (setf version-minor) NEW-VALUE OBJECT
-
- Package
cl-semver
- Methods
- Method: version-minor (SEMANTIC-VERSION semantic-version)
-
- Method: (setf version-minor) NEW-VALUE (SEMANTIC-VERSION semantic-version)
-
The minor version number
- Source
semver.lisp (file)
- Generic Function: version-patch OBJECT
-
- Generic Function: (setf version-patch) NEW-VALUE OBJECT
-
- Package
cl-semver
- Methods
- Method: version-patch (SEMANTIC-VERSION semantic-version)
-
- Method: (setf version-patch) NEW-VALUE (SEMANTIC-VERSION semantic-version)
-
The patch (or micro) version number
- Source
semver.lisp (file)
- Generic Function: version-pre-release VERSION
-
- Generic Function: (setf version-pre-release) NEW-VALUE VERSION
-
- Package
cl-semver
- Methods
- Method: version-pre-release (VERSION semantic-version)
-
- Method: (setf version-pre-release) NEW-VALUE (VERSION semantic-version)
-
- Source
semver.lisp (file)
- Generic Function: version-pre-release-identifiers OBJECT
-
- Generic Function: (setf version-pre-release-identifiers) NEW-VALUE OBJECT
-
- Package
cl-semver
- Methods
- Method: version-pre-release-identifiers (SEMANTIC-VERSION semantic-version)
-
- Method: (setf version-pre-release-identifiers) NEW-VALUE (SEMANTIC-VERSION semantic-version)
-
The list of pre release version identifiers
- Source
semver.lisp (file)
- Generic Function: version/= VERSION1 VERSION2
-
Version distinct comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Methods
- Method: version/= (VERSION1 version) (VERSION2 version)
-
- Method: version/= VERSION1 VERSION2
-
- Generic Function: version/== VERSION1 VERSION2
-
Version shallow distinct comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Methods
- Method: version/== (VERSION1 version) (VERSION2 version)
-
- Method: version/== VERSION1 VERSION2
-
- Generic Function: version< VERSION1 VERSION2
-
Version less than comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Methods
- Method: version< (VERSION1 version) (VERSION2 version)
-
NOTE: pre-release fields are only compared lexicographically; numbers are not taken into account. For example, ’alpha.2’ pre-release.
- Method: version< VERSION1 (VERSION2 (eql min-version))
-
- Method: version< (VERSION1 (eql max-version)) VERSION2
-
- Method: version< VERSION1 (VERSION2 (eql max-version))
-
- Method: version< (VERSION1 (eql min-version)) VERSION2
-
- Generic Function: version= VERSION1 VERSION2
-
Version equality comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Methods
- Method: version= (VERSION1 version) (VERSION2 version)
-
- Method: version= VERSION1 VERSION2
-
- Generic Function: version== VERSION1 VERSION2
-
Version shallow equality comparison
- Package
cl-semver
- Source
semver.lisp (file)
- Methods
- Method: version== (VERSION1 version) (VERSION2 version)
-
- Method: version== VERSION1 VERSION2
-
5.1.4 Classes
- Class: semantic-version ()
-
Instances represent a full version according to the semantic version specs (version 2.0.0 of the spec). http://semver.org/ . The main features of this class are validation and version comparison.
- Package
cl-semver
- Source
semver.lisp (file)
- Direct superclasses
version (class)
- Direct methods
-
- Direct slots
- Slot: major
-
The major version number
- Type
integer
- Initargs
:major
- Initform
(error "provide the major version number")
- Readers
version-major (generic function)
- Writers
(setf version-major) (generic function)
- Slot: minor
-
The minor version number
- Type
integer
- Initargs
:minor
- Initform
(error "provide the minor version number")
- Readers
version-minor (generic function)
- Writers
(setf version-minor) (generic function)
- Slot: patch
-
The patch (or micro) version number
- Type
integer
- Initargs
:patch
- Initform
(error "provide the patch version number")
- Readers
version-patch (generic function)
- Writers
(setf version-patch) (generic function)
- Slot: pre-release-identifiers
-
The list of pre release version identifiers
- Type
list
- Readers
version-pre-release-identifiers (generic function)
- Writers
(setf version-pre-release-identifiers) (generic function)
- Slot: build
-
The build version number
- Type
(or integer string null)
- Initargs
:build
- Readers
version-build (generic function)
- Writers
(setf version-build) (generic function)
- Class: version ()
-
Library version
- Package
cl-semver
- Source
semver.lisp (file)
- Direct superclasses
standard-object (class)
- Direct subclasses
semantic-version (class)
- Direct methods
-
5.2 Internal definitions
5.2.1 Special variables
- Special Variable: *previous-readtables*
-
- Package
cl-semver
- Source
semver.lisp (file)
5.2.2 Functions
- Function: %disable-version-syntax ()
-
Internal function used to restore previous readtable.
- Package
cl-semver
- Source
semver.lisp (file)
- Function: %enable-version-syntax ()
-
Internal function used to enable reader syntax and store current
readtable on stack.
- Package
cl-semver
- Source
semver.lisp (file)
- Function: prerelease< IDENTIFIERS1 IDENTIFIERS2
-
Returns non-NIL if the first list of pre-release identifiers is less than the
second. Any non-empty list of identifiers is < an empty list. If both are non
empty, they are compared element by element. An integer is always < a
string. Strings are compared lexically. If the first list is shorter than the
second and the first is a prefix of the second, the first is < than the second.
- Package
cl-semver
- Source
semver.lisp (file)
- Function: tuple< T1 T2
-
- Package
cl-semver
- Source
semver.lisp (file)
- Function: version-syntax-reader STREAM SUBCHAR ARG
-
- Package
cl-semver
- Source
semver.lisp (file)
5.2.3 Generic functions
- Generic Function: validate-version VERSION
-
Validate a version
- Package
cl-semver
- Source
semver.lisp (file)
- Methods
- Method: validate-version VERSION
-
- Method: validate-version (VERSION (eql min-version))
-
- Method: validate-version (VERSION (eql max-version))
-
- Method: validate-version (VERSION semantic-version)
-
Appendix A Indexes
A.1 Concepts
A.2 Functions
| Index Entry | | Section |
|
% | | |
| %disable-version-syntax : | | Internal functions |
| %enable-version-syntax : | | Internal functions |
|
( | | |
| (setf version-build) : | | Exported generic functions |
| (setf version-build) : | | Exported generic functions |
| (setf version-major) : | | Exported generic functions |
| (setf version-major) : | | Exported generic functions |
| (setf version-minor) : | | Exported generic functions |
| (setf version-minor) : | | Exported generic functions |
| (setf version-patch) : | | Exported generic functions |
| (setf version-patch) : | | Exported generic functions |
| (setf version-pre-release) : | | Exported generic functions |
| (setf version-pre-release) : | | Exported generic functions |
| (setf version-pre-release-identifiers) : | | Exported generic functions |
| (setf version-pre-release-identifiers) : | | Exported generic functions |
|
D | | |
| disable-version-syntax : | | Exported macros |
|
E | | |
| enable-version-syntax : | | Exported macros |
|
F | | |
| Function, %disable-version-syntax : | | Internal functions |
| Function, %enable-version-syntax : | | Internal functions |
| Function, make-semantic-version : | | Exported functions |
| Function, prerelease< : | | Internal functions |
| Function, print-version : | | Exported functions |
| Function, print-version-to-string : | | Exported functions |
| Function, read-version-from-string : | | Exported functions |
| Function, tuple< : | | Internal functions |
| Function, version-string-valid-p : | | Exported functions |
| Function, version-syntax-reader : | | Internal functions |
| Function, version<= : | | Exported functions |
| Function, version> : | | Exported functions |
| Function, version>= : | | Exported functions |
| Function, versionp : | | Exported functions |
|
G | | |
| Generic Function, (setf version-build) : | | Exported generic functions |
| Generic Function, (setf version-major) : | | Exported generic functions |
| Generic Function, (setf version-minor) : | | Exported generic functions |
| Generic Function, (setf version-patch) : | | Exported generic functions |
| Generic Function, (setf version-pre-release) : | | Exported generic functions |
| Generic Function, (setf version-pre-release-identifiers) : | | Exported generic functions |
| Generic Function, validate-version : | | Internal generic functions |
| Generic Function, version-build : | | Exported generic functions |
| Generic Function, version-major : | | Exported generic functions |
| Generic Function, version-minor : | | Exported generic functions |
| Generic Function, version-patch : | | Exported generic functions |
| Generic Function, version-pre-release : | | Exported generic functions |
| Generic Function, version-pre-release-identifiers : | | Exported generic functions |
| Generic Function, version/= : | | Exported generic functions |
| Generic Function, version/== : | | Exported generic functions |
| Generic Function, version< : | | Exported generic functions |
| Generic Function, version= : | | Exported generic functions |
| Generic Function, version== : | | Exported generic functions |
|
M | | |
| Macro, disable-version-syntax : | | Exported macros |
| Macro, enable-version-syntax : | | Exported macros |
| make-semantic-version : | | Exported functions |
| Method, (setf version-build) : | | Exported generic functions |
| Method, (setf version-major) : | | Exported generic functions |
| Method, (setf version-minor) : | | Exported generic functions |
| Method, (setf version-patch) : | | Exported generic functions |
| Method, (setf version-pre-release) : | | Exported generic functions |
| Method, (setf version-pre-release-identifiers) : | | Exported generic functions |
| Method, validate-version : | | Internal generic functions |
| Method, validate-version : | | Internal generic functions |
| Method, validate-version : | | Internal generic functions |
| Method, validate-version : | | Internal generic functions |
| Method, version-build : | | Exported generic functions |
| Method, version-major : | | Exported generic functions |
| Method, version-minor : | | Exported generic functions |
| Method, version-patch : | | Exported generic functions |
| Method, version-pre-release : | | Exported generic functions |
| Method, version-pre-release-identifiers : | | Exported generic functions |
| Method, version/= : | | Exported generic functions |
| Method, version/= : | | Exported generic functions |
| Method, version/== : | | Exported generic functions |
| Method, version/== : | | Exported generic functions |
| Method, version< : | | Exported generic functions |
| Method, version< : | | Exported generic functions |
| Method, version< : | | Exported generic functions |
| Method, version< : | | Exported generic functions |
| Method, version< : | | Exported generic functions |
| Method, version= : | | Exported generic functions |
| Method, version= : | | Exported generic functions |
| Method, version== : | | Exported generic functions |
| Method, version== : | | Exported generic functions |
|
P | | |
| prerelease< : | | Internal functions |
| print-version : | | Exported functions |
| print-version-to-string : | | Exported functions |
|
R | | |
| read-version-from-string : | | Exported functions |
|
T | | |
| tuple< : | | Internal functions |
|
V | | |
| validate-version : | | Internal generic functions |
| validate-version : | | Internal generic functions |
| validate-version : | | Internal generic functions |
| validate-version : | | Internal generic functions |
| validate-version : | | Internal generic functions |
| version-build : | | Exported generic functions |
| version-build : | | Exported generic functions |
| version-major : | | Exported generic functions |
| version-major : | | Exported generic functions |
| version-minor : | | Exported generic functions |
| version-minor : | | Exported generic functions |
| version-patch : | | Exported generic functions |
| version-patch : | | Exported generic functions |
| version-pre-release : | | Exported generic functions |
| version-pre-release : | | Exported generic functions |
| version-pre-release-identifiers : | | Exported generic functions |
| version-pre-release-identifiers : | | Exported generic functions |
| version-string-valid-p : | | Exported functions |
| version-syntax-reader : | | Internal functions |
| version/= : | | Exported generic functions |
| version/= : | | Exported generic functions |
| version/= : | | Exported generic functions |
| version/== : | | Exported generic functions |
| version/== : | | Exported generic functions |
| version/== : | | Exported generic functions |
| version< : | | Exported generic functions |
| version< : | | Exported generic functions |
| version< : | | Exported generic functions |
| version< : | | Exported generic functions |
| version< : | | Exported generic functions |
| version< : | | Exported generic functions |
| version<= : | | Exported functions |
| version= : | | Exported generic functions |
| version= : | | Exported generic functions |
| version= : | | Exported generic functions |
| version== : | | Exported generic functions |
| version== : | | Exported generic functions |
| version== : | | Exported generic functions |
| version> : | | Exported functions |
| version>= : | | Exported functions |
| versionp : | | Exported functions |
|
A.3 Variables
A.4 Data types