Does any documentation exist describing how versions should be specified in Compat.toml files in a registry? My initial assumption was that it would be the same rules as documented for package-level compat specifications, but that doesn't seem to be the case.
Are the options just exact.version.number or min.version.number-max.version.number? I see a lot of x.y.z-0 in General, is that a way to indicate that the highest supported version is unbounded (or maybe follows semver, like caret in package-level specifications)?
You're right, this should be documented. I will write up some docs at some point soon.
Would be nice to have this. There's a weird registry compatibility problem with Atom right now (https://discourse.julialang.org/t/juno-support-for-julia-1-2-0-not-ready-yet/27804) that also hitting me. (Seems like it should happen to anyone with JuliaInterpreter 0.7.0, see https://github.com/JunoLab/Atom.jl/pull/162). I was trying to fix it, but I've not dug into the internals enough to know the difference between "0.8.6-0", "0.7.0-*", or even the meaning of "0.6-0.7". Stuff like inclusive/exclusive bounds etc would be great to know. I can help write this if someone explains here.
In short:
"0.8.6-0" # [0.8.6 - 1.0.0)
"0.7.0-*" # [0.7.0 - โ)
"0.6-0.7" # [0.6.0 - 0.8.0)
You can use ~VersionRange~VersionSpec to investigate, for example:
julia> import Pkg.Types: VersionSpec
julia> v"0.8.5" โ VersionSpec("0.8.6-0")
false
julia> v"0.8.6" โ VersionSpec("0.8.6-0")
true
julia> v"0.9" โ VersionSpec("0.8.6-0")
true
julia> v"1" โ VersionSpec("0.8.6-0")
false
```julia
julia> import Pkg.Types: VersionSpec
julia> v"0.8.5" โ VersionSpec("0.8.6-*")
false
julia> v"0.8.6" โ VersionSpec("0.8.6-*")
true
julia> v"1" โ VersionSpec("0.8.6-*")
true
julia> v"1000" โ VersionSpec("0.8.6-*")
true
```julia
julia> import Pkg.Types: VersionSpec
julia> v"0.6.0" โ VersionSpec("0.6-0.7")
true
julia> v"0.7.0" โ VersionSpec("0.6-0.7")
true
julia> v"0.8" โ VersionSpec("0.6-0.7")
false
Most helpful comment
In short:
You can use ~
VersionRange~VersionSpecto investigate, for example:```julia
julia> import Pkg.Types: VersionSpec
julia> v"0.8.5" โ VersionSpec("0.8.6-*")
false
julia> v"0.8.6" โ VersionSpec("0.8.6-*")
true
julia> v"1" โ VersionSpec("0.8.6-*")
true
julia> v"1000" โ VersionSpec("0.8.6-*")
true