To give some extra clarification: Version lookup using ~>
is based on the Semantic Versioning Principle. It will match all versions starting with the one you specified, that are greater-or-equal in the last digit.
So 1.3
will match 1.3
up to but not including 2.0
, so it will match 1.3.1
, 1.4
, 1.4.5
, 1.99999999999999
, but not 2.0.1
.
1.2.4
will match 1.2.4
up to but not including 1.3
in exactly the same way, et cetera.
Note that release-candidate versions, (like 1.2-rc0
are not considered by the upgrading algorithm, as they are not taken to be ‘official, stable’ versions).
Semantic Versioning, and by extension using ~>
to specify dependencies, is very useful to ensure that your application’s dependencies have the latest bugfixes, but do not break because of backwards-incompatible dependency versions.