Skip to content

Instantly share code, notes, and snippets.

@rschwarz
Created November 21, 2018 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rschwarz/21c12edc29024789b15390b45e9c2f82 to your computer and use it in GitHub Desktop.
Save rschwarz/21c12edc29024789b15390b45e9c2f82 to your computer and use it in GitHub Desktop.
Write dependencies in Julia's stdlib using DOT format
import Pkg
import Pkg.TOML
const STDLIB_DIR = "/home/rs/opt/julia-1.0.2/share/julia/stdlib/v1.0"
const STDLIBS = readdir(STDLIB_DIR)
println("digraph stdlib {")
for (i, stdlib) in enumerate(STDLIBS)
proj = Pkg.TOML.parsefile(joinpath(STDLIB_DIR, stdlib, "Project.toml"))
if haskey(proj, "deps")
for (stdlib_dep, uuid) in proj["deps"]
println(stdlib, " -> ", stdlib_dep)
end
end
end
println("}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment