# How to get dependencies of latest version from Deps.toml?

**URL:** <https://discourse.julialang.org/t/how-to-get-dependencies-of-latest-version-from-deps-toml/37942>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 21, 2020, 3:56am UTC](https://discourse.julialang.org/t/how-to-get-dependencies-of-latest-version-from-deps-toml/37942 "2020-04-21T03:56:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [April 21, 2020, 3:56am UTC](https://discourse.julialang.org/t/how-to-get-dependencies-of-latest-version-from-deps-toml/37942/1 "2020-04-21T03:56:12Z")

</div>

Let’s say you have a Deps.toml file:

- [Deps.toml](https://github.com/JuliaRegistries/General/blob/master/L/LightGraphs/Deps.toml)

How do you parse it to get the dependency packages that the latest version would have?

// related to: [JuliaPackages.jl#3](https://github.com/djsegal/JuliaPackages.jl/issues/3)

* * *

One hiccup is I have no clue what `["0.14-0"]` means as I assume `v0` comes before `v0.14`:

```julia
["0.14-0"]
Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"

```

---

<div class="post-metadata">

**Author:** ![anon94023334](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Post date:** [April 21, 2020, 4:14am UTC](https://discourse.julialang.org/t/how-to-get-dependencies-of-latest-version-from-deps-toml/37942/2 "2020-04-21T04:14:33Z")

</div>

I _think_ it means, “starting at v0.14 and continuing through any version that is in major version 0”.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [April 21, 2020, 5:43am UTC](https://discourse.julialang.org/t/how-to-get-dependencies-of-latest-version-from-deps-toml/37942/3 "2020-04-21T05:43:36Z")

</div>

```julia
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"

```
