How do you specify numeric values for both an upper and a lower bound for a package in Project.toml
?
In particular, I would like to specify that a package is compatible with 1.90 ≤ PyCall < 2
. My first thought was
PyCall = "≥ 1.90, < 2"
but the Project.toml
documentation states that it takes the union of comma-separated values, whereas I want the intersection.
Nowadays the registry requires an upper bound for merging updates, and I don’t want to manually specify a list of minor versions like "1.90, 1.91, 1.92, …"
.
The source code seems to indicate that this is impossible, even though the underlying VersionRange
type seems to support it.
It looks like hyphenated ranges were added in Julia 1.4, but this looks like an inclusive range, where I want < 2
rather than ≤ 2
I filed an issue: support specifying both lower and upper compatibility bounds · Issue #1748 · JuliaLang/Pkg.jl · GitHub
I thought this was what the caret did?
^1.90
1 Like
Oh duh, ^1.90
(or 1.90
, since ^
is the default) according to the semver spec means exactly 1.90 ≤ version < 2
.
1 Like