The cl-semver Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-semver Reference Manual

This is the cl-semver Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 04:02:18 2022 GMT+0.

Table of Contents


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.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-semver

Semantic Version implementation

Author

Mariano Montone

License

MIT

Dependencies
  • alexandria (system).
  • esrap (system).
  • named-readtables (system).
Source

cl-semver.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 cl-semver/cl-semver.asd

Source

cl-semver.asd.

Parent Component

cl-semver (system).

ASDF Systems

cl-semver.


3.1.2 cl-semver/package.lisp

Source

cl-semver.asd.

Parent Component

cl-semver (system).

Packages

cl-semver.


Previous: , Up: Lisp   [Contents][Index]

3.1.3 cl-semver/semver.lisp

Dependency

package.lisp (file).

Source

cl-semver.asd.

Parent Component

cl-semver (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-semver

cl-semver is a Common Lisp implementation of the Semantic Versioning Specification (http://semver.org/

Source

package.lisp.

Nickname

semver

Use List
  • common-lisp.
  • editor-hints.named-readtables.
  • esrap.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


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.

Macro: enable-version-syntax ()

Enable version reader syntax.

Package

cl-semver.

Source

semver.lisp.


5.1.2 Ordinary functions

Function: make-semantic-version (major minor patch &optional pre-release build)

Creates a semantic version

Package

cl-semver.

Source

semver.lisp.

Function: print-version (version &optional stream)

Prints a version to a stream

Package

cl-semver.

Source

semver.lisp.

Function: print-version-to-string (version)

Prints a version to a string

Package

cl-semver.

Source

semver.lisp.

Function: read-version-from-string (string)

Parses a semantic version from a string

Package

cl-semver.

Source

semver.lisp.

Function: version-string-valid-p (string)

Validate a version string

Package

cl-semver.

Source

semver.lisp.

Function: version<= (version1 version2)

Version less or equal comparison

Package

cl-semver.

Source

semver.lisp.

Function: version> (version1 version2)

Version greater than comparison

Package

cl-semver.

Source

semver.lisp.

Function: version>= (version1 version2)

Version greater or equal comparison

Package

cl-semver.

Source

semver.lisp.

Function: versionp (object)
Package

cl-semver.

Source

semver.lisp.


5.1.3 Generic functions

Generic Reader: version-build (object)
Generic Writer: (setf version-build) (object)
Package

cl-semver.

Methods
Reader Method: version-build ((semantic-version semantic-version))
Writer Method: (setf version-build) ((semantic-version semantic-version))

The build version number

Source

semver.lisp.

Target Slot

build.

Generic Reader: version-major (object)
Generic Writer: (setf version-major) (object)
Package

cl-semver.

Methods
Reader Method: version-major ((semantic-version semantic-version))
Writer Method: (setf version-major) ((semantic-version semantic-version))

The major version number

Source

semver.lisp.

Target Slot

major.

Generic Reader: version-minor (object)
Generic Writer: (setf version-minor) (object)
Package

cl-semver.

Methods
Reader Method: version-minor ((semantic-version semantic-version))
Writer Method: (setf version-minor) ((semantic-version semantic-version))

The minor version number

Source

semver.lisp.

Target Slot

minor.

Generic Reader: version-patch (object)
Generic Writer: (setf version-patch) (object)
Package

cl-semver.

Methods
Reader Method: version-patch ((semantic-version semantic-version))
Writer Method: (setf version-patch) ((semantic-version semantic-version))

The patch (or micro) version number

Source

semver.lisp.

Target Slot

patch.

Generic Function: version-pre-release (version)
Package

cl-semver.

Methods
Method: version-pre-release ((version semantic-version))
Source

semver.lisp.

Generic Function: (setf version-pre-release) (version)
Package

cl-semver.

Methods
Method: (setf version-pre-release) ((version semantic-version))
Source

semver.lisp.

Generic Reader: version-pre-release-identifiers (object)
Generic Writer: (setf version-pre-release-identifiers) (object)
Package

cl-semver.

Methods
Reader Method: version-pre-release-identifiers ((semantic-version semantic-version))
Writer Method: (setf version-pre-release-identifiers) ((semantic-version semantic-version))

The list of pre release version identifiers

Source

semver.lisp.

Target Slot

pre-release-identifiers.

Generic Function: version/= (version1 version2)

Version distinct comparison

Package

cl-semver.

Source

semver.lisp.

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.

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.

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.

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.

Methods
Method: version== ((version1 version) (version2 version))
Method: version== (version1 version2)

5.1.4 Standalone methods

Method: initialize-instance :after ((version semantic-version) &rest initargs &key pre-release)
Source

semver.lisp.

Method: make-load-form ((version version) &optional environment)
Source

semver.lisp.

Method: print-object ((version semantic-version) stream)
Source

semver.lisp.


5.1.5 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.

Direct superclasses

version.

Direct methods
Direct slots
Slot: major

The major version number

Type

integer

Initform

(error "provide the major version number")

Initargs

:major

Readers

version-major.

Writers

(setf version-major).

Slot: minor

The minor version number

Type

integer

Initform

(error "provide the minor version number")

Initargs

:minor

Readers

version-minor.

Writers

(setf version-minor).

Slot: patch

The patch (or micro) version number

Type

integer

Initform

(error "provide the patch version number")

Initargs

:patch

Readers

version-patch.

Writers

(setf version-patch).

Slot: pre-release-identifiers

The list of pre release version identifiers

Type

list

Readers

version-pre-release-identifiers.

Writers

(setf version-pre-release-identifiers).

Slot: build

The build version number

Type

(or integer string null)

Initargs

:build

Readers

version-build.

Writers

(setf version-build).

Class: version

Library version

Package

cl-semver.

Source

semver.lisp.

Direct subclasses

semantic-version.

Direct methods

5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Special variables

Special Variable: *previous-readtables*
Package

cl-semver.

Source

semver.lisp.


5.2.2 Ordinary functions

Function: %disable-version-syntax ()

Internal function used to restore previous readtable.

Package

cl-semver.

Source

semver.lisp.

Function: %enable-version-syntax ()

Internal function used to enable reader syntax and store current readtable on stack.

Package

cl-semver.

Source

semver.lisp.

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.

Function: tuple< (t1 t2)
Package

cl-semver.

Source

semver.lisp.

Function: version-syntax-reader (stream subchar arg)
Package

cl-semver.

Source

semver.lisp.


5.2.3 Generic functions

Generic Function: validate-version (version)

Validate a version

Package

cl-semver.

Source

semver.lisp.

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


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
D   E   F   G   I   M   P   R   T   V  
Index Entry  Section

%
%disable-version-syntax: Private ordinary functions
%enable-version-syntax: Private ordinary functions

(
(setf version-build): Public generic functions
(setf version-build): Public generic functions
(setf version-major): Public generic functions
(setf version-major): Public generic functions
(setf version-minor): Public generic functions
(setf version-minor): Public generic functions
(setf version-patch): Public generic functions
(setf version-patch): Public generic functions
(setf version-pre-release): Public generic functions
(setf version-pre-release): Public generic functions
(setf version-pre-release-identifiers): Public generic functions
(setf version-pre-release-identifiers): Public generic functions

D
disable-version-syntax: Public macros

E
enable-version-syntax: Public macros

F
Function, %disable-version-syntax: Private ordinary functions
Function, %enable-version-syntax: Private ordinary functions
Function, make-semantic-version: Public ordinary functions
Function, prerelease<: Private ordinary functions
Function, print-version: Public ordinary functions
Function, print-version-to-string: Public ordinary functions
Function, read-version-from-string: Public ordinary functions
Function, tuple<: Private ordinary functions
Function, version-string-valid-p: Public ordinary functions
Function, version-syntax-reader: Private ordinary functions
Function, version<=: Public ordinary functions
Function, version>: Public ordinary functions
Function, version>=: Public ordinary functions
Function, versionp: Public ordinary functions

G
Generic Function, (setf version-build): Public generic functions
Generic Function, (setf version-major): Public generic functions
Generic Function, (setf version-minor): Public generic functions
Generic Function, (setf version-patch): Public generic functions
Generic Function, (setf version-pre-release): Public generic functions
Generic Function, (setf version-pre-release-identifiers): Public generic functions
Generic Function, validate-version: Private generic functions
Generic Function, version-build: Public generic functions
Generic Function, version-major: Public generic functions
Generic Function, version-minor: Public generic functions
Generic Function, version-patch: Public generic functions
Generic Function, version-pre-release: Public generic functions
Generic Function, version-pre-release-identifiers: Public generic functions
Generic Function, version/=: Public generic functions
Generic Function, version/==: Public generic functions
Generic Function, version<: Public generic functions
Generic Function, version=: Public generic functions
Generic Function, version==: Public generic functions

I
initialize-instance: Public standalone methods

M
Macro, disable-version-syntax: Public macros
Macro, enable-version-syntax: Public macros
make-load-form: Public standalone methods
make-semantic-version: Public ordinary functions
Method, (setf version-build): Public generic functions
Method, (setf version-major): Public generic functions
Method, (setf version-minor): Public generic functions
Method, (setf version-patch): Public generic functions
Method, (setf version-pre-release): Public generic functions
Method, (setf version-pre-release-identifiers): Public generic functions
Method, initialize-instance: Public standalone methods
Method, make-load-form: Public standalone methods
Method, print-object: Public standalone methods
Method, validate-version: Private generic functions
Method, validate-version: Private generic functions
Method, validate-version: Private generic functions
Method, validate-version: Private generic functions
Method, version-build: Public generic functions
Method, version-major: Public generic functions
Method, version-minor: Public generic functions
Method, version-patch: Public generic functions
Method, version-pre-release: Public generic functions
Method, version-pre-release-identifiers: Public generic functions
Method, version/=: Public generic functions
Method, version/=: Public generic functions
Method, version/==: Public generic functions
Method, version/==: Public generic functions
Method, version<: Public generic functions
Method, version<: Public generic functions
Method, version<: Public generic functions
Method, version<: Public generic functions
Method, version<: Public generic functions
Method, version=: Public generic functions
Method, version=: Public generic functions
Method, version==: Public generic functions
Method, version==: Public generic functions

P
prerelease<: Private ordinary functions
print-object: Public standalone methods
print-version: Public ordinary functions
print-version-to-string: Public ordinary functions

R
read-version-from-string: Public ordinary functions

T
tuple<: Private ordinary functions

V
validate-version: Private generic functions
validate-version: Private generic functions
validate-version: Private generic functions
validate-version: Private generic functions
validate-version: Private generic functions
version-build: Public generic functions
version-build: Public generic functions
version-major: Public generic functions
version-major: Public generic functions
version-minor: Public generic functions
version-minor: Public generic functions
version-patch: Public generic functions
version-patch: Public generic functions
version-pre-release: Public generic functions
version-pre-release: Public generic functions
version-pre-release-identifiers: Public generic functions
version-pre-release-identifiers: Public generic functions
version-string-valid-p: Public ordinary functions
version-syntax-reader: Private ordinary functions
version/=: Public generic functions
version/=: Public generic functions
version/=: Public generic functions
version/==: Public generic functions
version/==: Public generic functions
version/==: Public generic functions
version<: Public generic functions
version<: Public generic functions
version<: Public generic functions
version<: Public generic functions
version<: Public generic functions
version<: Public generic functions
version<=: Public ordinary functions
version=: Public generic functions
version=: Public generic functions
version=: Public generic functions
version==: Public generic functions
version==: Public generic functions
version==: Public generic functions
version>: Public ordinary functions
version>=: Public ordinary functions
versionp: Public ordinary functions

Jump to:   %   (  
D   E   F   G   I   M   P   R   T   V