Skip to content

Commit d23a46f

Browse files
committed
Add more documentation for ~> requirements
Signed-off-by: Eric Meadows-Jönsson <[email protected]>
1 parent 6c0cbbd commit d23a46f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/elixir/lib/version.ex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ defmodule Version do
5050
be expressed as:
5151
5252
"~> 2.0.0"
53+
54+
`~>` will never include pre-release versions of its upper bound.
55+
It can also be used to set an upper bound on only the major
56+
version part. See the table below for `~>` requirements and
57+
their corresponding translation.
58+
59+
`~>` | Translation
60+
:------------- | :---------------------
61+
`~> 2.0.0` | `>= 2.0.0 and < 2.1.0`
62+
`~> 2.1.2` | `>= 2.1.2 and < 2.2.0`
63+
`~> 2.1.3-dev` | `>= 2.1.3-dev and < 2.2.0`
64+
`~> 2.0` | `>= 2.0.0 and < 3.0.0`
65+
`~> 2.1` | `>= 2.1.0 and < 3.0.0`
5366
5467
"""
5568

0 commit comments

Comments
 (0)