tfiers / PkgGraph.jl

Visualize the dependency graph of a Julia package
https://tfiers.github.io/PkgGraph.jl
MIT License
43 stars 2 forks source link

Latest version does not compile #90

Closed baggepinnen closed 1 year ago

baggepinnen commented 1 year ago
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.5 (2023-01-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.8) pkg> activate --temp
  Activating new project at `/tmp/jl_d6zHyQ`

(jl_d6zHyQ) pkg> add PkgGraph
    Updating registry at `~/.julia/registries/JuliaSimRegistry`
    Updating git-repo `git@github.com:JuliaComputing/JuliaSimRegistry.git`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed DefaultApplication ─ v1.1.0
   Installed PkgGraph ─────────── v0.5.0
    Updating `/tmp/jl_d6zHyQ/Project.toml`
  [f9c1b9e4] + PkgGraph v0.5.0

julia> using PkgGraph
[ Info: Precompiling PkgGraph [f9c1b9e4-72e8-4a14-ade5-14f45fc35f11]
ERROR: LoadError: AssertionError: reg.name == "General"
Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/PkgGraph/PcO3t/src/modules/DepGraph/registry.jl:8
baggepinnen commented 1 year ago

This issue is this

const reg = first(reachable_registries())
@assert reg.name == "General"

but this fails if you have more than general added as registry. In my case, I have a private registry as well and this registry comes first in the list.

This issue is fixed by