Many times we need to match packages like this: something-1.0.2a.*

But that expression is not allowed with ~ (only targets revisions) and
neither with * (.*) is invalid.

So my suggestion is to add ~> as another operator.  With it we can
have an expression like '~>pkg-1.0.2a' and it would be equivalent to
'>=pkg-1.0.2a' and '<pkg-1.0.2b'.  Another expression like
'~>pkg-1.0.2' would be equivalent to '>=pkg-1.0.2' and '<pkg-1.0.3'.

If comparing by arithmetic operations turns out to be difficult (i.e.
predicting the next version to compare against), then maybe we could
just compare it with pattern(s).  For example if we have 'pkg-1.02a'
as the base version, then the valid versions we need to get are
'pkg-1.02a', 'pkg-1.02a.*' and
'pkg-1.02a(_(alpha|beta|pre|p)|-r)[0-9]+'.

The operator is copied from Ruby's Gemfile so it would be familiar to
anyone developing Ruby as well.

Reply via email to