julia

Is there any way to build package dependency tree in julia-lang?


Using npm list will show a tree of installed packages, versions and relations:

enter image description here

Although Julia package management is differ (e.g normally no duplicate copy of a package exists), But is there any way to:


Solution

  • I don't think there's a simple function, but it shouldn't be too hard to do with these two functions:

    julia> Pkg.dependents("Cairo")
    10-element Array{AbstractString,1}:
     "Tk"
     "Gtk"
     "Mamba"
     "Drawing"
     "GtkUtilities"
     "ProfileView"
     "Brim"
     "Winston"
     "EcologicalNetwork"
     "VennEuler"
    
    julia> Pkg.installed()
    Dict{ASCIIString,VersionNumber} with 119 entries:
      "Libz"             => v"0.0.2"
      "Gtk"              => v"0.9.3"
      "Interact"         => v"0.3.0"
      "ForwardDiff"      => v"0.1.4"
      "Benchmark"        => v"0.1.0"
      "AxisAlgorithms"   => v"0.1.4"
      "Cairo"            => v"0.2.31+"
      "HttpParser"       => v"0.1.1"
      "DataFrames"       => v"0.6.10"
      "Requests"         => v"0.3.4"
      "QuartzImageIO"    => v"0.1.0+"
      "Markdown"         => v"0.3.0"
      "Requires"         => v"0.2.2"
      "ArgParse"         => v"0.3.0"
      ⋮                  => ⋮