Pkg.jl: Documentation for registry Compat.toml version conventions?

Created on 15 May 2019  ยท  3Comments  ยท  Source: JuliaLang/Pkg.jl

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)?

documentation

Most helpful comment

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

All 3 comments

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanKarpinski picture StefanKarpinski  ยท  3Comments

omus picture omus  ยท  4Comments

GregPlowman picture GregPlowman  ยท  3Comments

cscherrer picture cscherrer  ยท  3Comments

timholy picture timholy  ยท  4Comments