Let’s say you have a Deps.toml file:
How do you parse it to get the dependency packages that the latest version would have?
// related to: JuliaPackages.jl#3
One hiccup is I have no clue what ["0.14-0"]
means as I assume v0
comes before v0.14
:
["0.14-0"]
Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
I think it means, “starting at v0.14 and continuing through any version that is in major version 0”.
2 Likes
julia> using RegistryTools: Compress
julia> deps = Compress.load("/home/gunnar/.julia/registries/General/L/LightGraphs/Deps.toml")
Dict{VersionNumber,Dict{Any,Any}} with 10 entries:
v"0.14.0" => Dict{Any,Any}("Statistics"=>"10745b16-79ce-11e8-11f9-7d13ad32a3b2","Test"=>…
v"1.0.2" => Dict{Any,Any}("Statistics"=>"10745b16-79ce-11e8-11f9-7d13ad32a3b2","Test"=>…
v"0.13.0" => Dict{Any,Any}("Test"=>"8dfed614-e22c-5e08-85e1-65c5234f0b40","Random"=>"9a3…
v"1.3.1" => Dict{Any,Any}("SharedArrays"=>"1a1011a3-84de-559e-8e89-a11a2f7dc383","Stati…
v"1.1.0" => Dict{Any,Any}("Statistics"=>"10745b16-79ce-11e8-11f9-7d13ad32a3b2","Test"=>…
v"1.0.1" => Dict{Any,Any}("Statistics"=>"10745b16-79ce-11e8-11f9-7d13ad32a3b2","Test"=>…
v"1.2.0" => Dict{Any,Any}("Statistics"=>"10745b16-79ce-11e8-11f9-7d13ad32a3b2","Test"=>…
v"1.0.0" => Dict{Any,Any}("Statistics"=>"10745b16-79ce-11e8-11f9-7d13ad32a3b2","Test"=>…
v"0.13.1" => Dict{Any,Any}("Test"=>"8dfed614-e22c-5e08-85e1-65c5234f0b40","Random"=>"9a3…
v"1.3.0" => Dict{Any,Any}("SharedArrays"=>"1a1011a3-84de-559e-8e89-a11a2f7dc383","Stati…
julia> deps[v"1.3.1"]
Dict{Any,Any} with 10 entries:
"SharedArrays" => "1a1011a3-84de-559e-8e89-a11a2f7dc383"
"Statistics" => "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
"DataStructures" => "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
"LinearAlgebra" => "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
"SparseArrays" => "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
"Random" => "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
"ArnoldiMethod" => "ec485272-7323-5ecc-a04f-4719b315124d"
"Inflate" => "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
"Distributed" => "8ba89e20-285c-5b6f-9357-94700520ee1b"
"SimpleTraits" => "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
4 Likes