JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
621 stars 261 forks source link

Adding an already-installed General registry via pkgserver shows no output, where clones do #3747

Closed IanButterworth closed 2 months ago

IanButterworth commented 9 months ago

This does update General, as a progress meter shows up but it disappears and doesn't let you know it already exists like a clone does.

It's quite confusing on CI because this is all you see.

$ julia -e 'using Pkg; Pkg.Registry.add([RegistrySpec(name="General"), RegistrySpec(url="https://github.com/HolyLab/HolyLabRegistry")]);'
     Cloning registry from "https://github.com/HolyLab/HolyLabRegistry"
Registry `HolyLabRegistry` already exists in `~/.julia/registries/HolyLabRegistry`.
omus commented 9 months ago

Something else that's weird about this is that it appears we clone the entire registry first before we check if it's already present. Seems like we could see a performance improvement if we checked for the registries existence first and if it exists refresh it?

Update: Made a separate issue for this: https://github.com/JuliaLang/Pkg.jl/issues/3753