You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow major-version upper bounds in version ranges #698
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:
module load cmake@3.20:3
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.
Activity
Accept abbreviated upper bounds in version ranges
Accept abbreviated upper bounds in version ranges
Accept abbreviated upper bounds in version ranges