Skip to content

Commit 941e459

Browse files
authored
Add detail to VersionNumber documentation (#60040)
I noticed that Julia's `VersionNumber` differs from the cited standard in two ways. This PR documents these differences.
1 parent 6058082 commit 941e459

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

base/version.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ Version number type which follows the specifications of
1212
[semantic versioning (semver)](https://semver.org/spec/v2.0.0-rc.2.html), composed of major, minor
1313
and patch numeric values, followed by pre-release and build
1414
alphanumeric annotations.
15+
As an extension to this standard, Julia also allows a single, empty prerelease annotation
16+
if there is no build identifier present (e.g. `1.0-`), or a single, empty build annotation (e.g. `1.0+`).
1517
1618
`VersionNumber` objects can be compared with all of the standard comparison
1719
operators (`==`, `<`, `<=`, etc.), with the result following semver v2.0.0-rc.2 rules.
20+
Different from the semver standard, build annotations are not ignored when comparing version numbers.
1821
1922
`VersionNumber` has the following public fields:
2023
- `v.major::Integer`

0 commit comments

Comments
 (0)