General registry delays, and a workaround

From time to time, you may notice that a new package or new version is not available for installation on your local computer, even though the corresponding pull request has been merged in the General registry.

This is caused by the Pkg Servers serving an outdated version of the General registry. It is a known issue, and we are actively working on it.

In the meantime, if you need immediate access to new packages or new versions, you can switch from the Pkg Server registry to the Git registry.

Here are the steps for switching to the Git registry:

julia> import Pkg

julia> Pkg.Registry.rm("General")

julia> ENV["JULIA_PKG_SERVER"] = ""

julia> Pkg.Registry.add("General")

In order to switch back to the Pkg Server registry, run the following:

julia> import Pkg

julia> Pkg.Registry.rm("General")

julia> delete!(ENV, "JULIA_PKG_SERVER")

julia> Pkg.Registry.add("General")
21 Likes

For completeness, how do you undo this?

1 Like

To turn back to a registry from the package server:

julia> import Pkg

julia> Pkg.Registry.rm("General")

julia> Pkg.Registry.add("General")

(This assumes that you haven’t set the JULIA_PKG_SERVER environment variable to an empty string outside of Julia or earlier in the same Julia session.)

7 Likes

To account for this, you could instead do the following.

In order to switch back to the Pkg Server registry, run the following:

julia> import Pkg

julia> Pkg.Registry.rm("General")

julia> delete!(ENV, "JULIA_PKG_SERVER")

julia> Pkg.Registry.add("General")

I’ve added these instructions to the original post.

1 Like

Sometimes it also seems be helpful to add this line to github CI scripts so that Documenter will run properly. Here is an example: