Skip to content

Instantly share code, notes, and snippets.

@o314
Forked from rschwarz/stdlib-deps-dot.jl
Created December 6, 2018 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save o314/cc907f86a9a41884465bbd67a99b66be to your computer and use it in GitHub Desktop.
Save o314/cc907f86a9a41884465bbd67a99b66be 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