Is your feature request related to a problem? Please describe.
Modules currently rejects version ranges whose bounds have different precision:
$ module load cmake@3.20:3
ERROR: Invalid version range '3.20:3'
Spack supports this syntax. For example, with cmake@3.31.11 and cmake@4.4.3 installed:
$ spack find cmake@3.20:3
cmake@3.31.11
This is useful to express "version >= 3.20, but still within major version 3".
Describe the solution you'd like
Accept version ranges such as:
and match compatible 3.x versions satisfying the lower bound.
For example, cmake@3.31.11 should match, while cmake@4.4.3 should not.
Describe alternatives you've considered
A possible workaround is to use a range such as @3.20:3.999.
This works in many practical cases, but it is less natural and requires inventing an arbitrary upper bound instead of simply expressing "up to the end of major version 3".
Additional context
Existing ranges such as @3 and @3:4 would remain unchanged.
Since @3.20:3 is currently rejected as invalid syntax, adding support for it should have limited impact on existing behavior.
Is your feature request related to a problem? Please describe.
Modules currently rejects version ranges whose bounds have different precision:
$ module load cmake@3.20:3 ERROR: Invalid version range '3.20:3'Spack supports this syntax. For example, with
cmake@3.31.11andcmake@4.4.3installed:This is useful to express "version >= 3.20, but still within major version 3".
Describe the solution you'd like
Accept version ranges such as:
and match compatible
3.xversions satisfying the lower bound.For example,
cmake@3.31.11should match, whilecmake@4.4.3should not.Describe alternatives you've considered
A possible workaround is to use a range such as
@3.20:3.999.This works in many practical cases, but it is less natural and requires inventing an arbitrary upper bound instead of simply expressing "up to the end of major version 3".
Additional context
Existing ranges such as
@3and@3:4would remain unchanged.Since
@3.20:3is currently rejected as invalid syntax, adding support for it should have limited impact on existing behavior.