Version: Racket Version Checking
The "version" collection contains several version-related pieces that are used by Racket. See also version from racket/base.
1 Installed Patch Level
(require version/patchlevel) | package: base |
2 Checking Available Versions
(require version/check) | package: base |
procedure
(check-version) → (or/c symbol? list?)
`ok —
You’re fine. `(ok-but ,version) —
You have a fine stable version, but note that there is a newer alpha version available numbered version. `(newer ,version) —
You have an old version. Please upgrade to version. `(newer ,version ,alpha) —
You have an old-but-stable version, please upgrade to version; you may consider also the newer alpha version numbered alpha. `(error ,message) —
An error occurred, and message is a string that indicates the error. `(error ,message ,additional-info) —
An error occurred; message is a string that indicates the error, and additional-info is a string containing a system error. The additional-info content is always parenthesizes, so message is a short error and (string-append message " " additional-info) is a verbose one.
3 Version Utilities
(require version/utils) | package: base |
procedure
(valid-version? str) → boolean?
str : string?
procedure
(version->list str)
→ (list integer? integer? integer? integer?) str : valid-version?
procedure
str1 : valid-version? str2 : valid-version?
procedure
(version<=? str1 str2) → boolean?
str1 : valid-version? str2 : valid-version?
procedure
(alpha-version? str) → boolean?
str : valid-version?
procedure
(version->integer str) → (or/c integer? false/c)
str : string?
Note that this is the only function that deals with legacy version strings.