How do I convert to using the package tarball format?

I can’t remember when this started (I think it was when I started using the 11.x series, it definitely happens for 11.2 and 11.3). When I do a Pkg.add(...) or a Pkg.update(), if it’s time for the repository data to be refreshed I get a message

    Updating registry at `C:\Users\[username]\.julia\registries\General`
┌ Info: The General registry is installed via git. Consider reinstalling it via
│ the newer faster direct from tarball format by running:
│   pkg> registry rm General; registry add General
└

In this case, it’s on a Windows box, but the same thing happens when running Linux (or WSL). I have followed the instructions a few times, but still get the same message when a refresh happens.
I thought that this post (on a slightly different topic) might be a solution:

but again there was no change.
This is an annoyance, not a showstopper, but if there’s a faster way for things to install or update, it would be nice to find it.

These instructions should be effective in the default case but under some circumstances they won’t be. Things to look into is if you have set the environment variable JULIA_PKG_SERVER or if the package server is unreachable for firewall or other reasons.

1 Like

Thank you for your response. I haven’t set JULIA_PKG_SERVER explicitly, but it appears to be set to the empty string "" in the REPL. I tried

delete!( ENV,"JULIA_PKG_SERVER")
# output of ENV...
julia> haskey(ENV, "JULIA_PKG_SERVER")
false

After that, I tried

(@v1.11) pkg> update

and got the same warning as before.

Setting JULIA_PKG_SERVER to an empty string is a way to explicitly opt out of any use of the package servers, so you first need to find out what’s causing that. It’s not something which happens by default, so something in your environment must be doing it explicitly.

Once that is fixed,

pkg> registry rm General; registry add General

should give you a registry in tarball format and the warning should go away.

1 Like

Thanks for your update. As described in my earlier posts, I used the default value

ENV["JULIA_PKG_SERVER"} = ""

when running

pkg> registry rm General; registry add General

The attempt after deleting the key altogether was an experiment that clearly didn’t work.
I’m sure you are correct when you suggest that something else in my environment is odd. At some point I’ll look into Pkg to try to work out how the warning is triggered, but it’s no big deal to live with it for now. Thanks again for your advice.

I have checked the source of Pkg.jl. There are two places in the code where the @info message could be emitted. Both of them check whether the registry name is "General" (obviously true in my case), and whether ENV has the key "JULIA_PKG_GEN_REG_FMT_CHECK", defaulting to true if it doesn’t.
Since that key doesn’t exist in my environment, both tests pass and the message is emitted. I don’t know when the variable for the second test could/should have been set, but I have now added

ENV["JULIA_PKG_GEN_REG_FMT_CHECK"] = "0"

to ~/.julia/startup.jl and did

pkg> registry rm General; registry add General

The message has disappeared.
Your replies prompted me to do a proper investigation, so thanks again.