How to switch JuliaPro to use the General registry?

I wanted to try PackageCompiler, but JuliaPro registry has not included it yet:

(JuliaPro_v1.0.1.1) pkg> add PackageCompiler
  Updating registry at `C:\JuliaPro-1.0.1.1\pkgs-1.0.1.1\registries\JuliaPro`
  Updating git-repo `https://pkg.juliacomputing.com/registry/JuliaPro`
ERROR: The following package names could not be resolved:
 * PackageCompiler (not found in project, manifest or registry)
Please specify by known `name=uuid`.

I saw that the General registry included it:

However, I don’t know how to switch to use the General registry. I did find string “https://pkg.juliacomputing.com/” inside C:\JuliaPro-1.0.1.1\Julia-1.0.1\etc\julia\startup.jl and tried replacing it with “https://github.com/JuliaRegistries/General/” then restarting Julia, but that didn’t seem to work.

I also tried directly adding from GitHub, but was soon led to a rabbit hole of dependency tree:

(JuliaPro_v1.0.1.1) pkg> add https://github.com/JuliaLang/PackageCompiler.jl
  Updating git-repo `https://github.com/JuliaLang/PackageCompiler.jl`
[ Info: Assigning UUID e7f35708-9c4f-53ac-b576-fe1e8b0e8cf1 to PackageCompiler
 Resolving package versions...
ERROR: The following package names could not be resolved:
 * ArgParse (not found in project, manifest or registry)
 * SnoopCompile (not found in project, manifest or registry)
Please specify by known `name=uuid`.

etc. etc.

Does someone know how to switch JuliaPro to use the General registry (temporarily)? Thanks!

Just clone the General registry in the same folder where your JuliaPro registry lives (seemingly in C:\JuliaPro-1.0.1.1\pkgs-1.0.1.1\registries). Let us know if that does not work.

Sorry I have little experience dealing with software registries. Can you elaborate the steps to “clone the General registry”? Is it a file to be downloaded and copied into a folder? Don’t I need to change any settings of JuliaPro (e.g. the link in the startup.jl file I mentioned) so Julia knows where to search for a new package? Thanks!!!

You have three options:

  1. If you have Git installed, go to C:\JuliaPro-1.0.1.1\pkgs-1.0.1.1\registries, and execute git clone https://github.com/JuliaRegistries/General.git.
  2. If you don’t have Git or do not want to use it, go to GitHub - JuliaRegistries/General: The official registry of general Julia packages, click the button “Clone or download”, download it as a zip file, and extract it into C:/JuliaPro-1.0.1.1/pkgs-1.0.1.1/registries.
  3. You may use the LibGit2 module within Julia (it is available in the JuliaPro registry, so you should be able to install and use it). In this case:
pkg>add LibGit2
julia>using LibGit2
julia>LibGit2.clone("https://github.com/JuliaRegistries/General.git",
      "C:/JuliaPro-1.0.1.1/pkgs-1.0.1.1/registries/General")

There is nothing else to be done - except perhaps restart Julia.

1 Like

Oops. Option no. 2 (download it as a zip) is not advisable, since the downloaded file is not a git repository, only a snapshot of the current version. So better use Git (in Julia with LibGit2 or as an external tool, as you prefer).

1 Like

Thank you very much for the reply!

Yesterday to try the General registry I installed the standard Julia 1.0.1 and found it much faster to start and load a module than JuliaPro 1.0.1. So I will use the standard one for now and try the PackageCompiler over there. When I come back to JuliaPro in the near future I’ll try the cloning method you explained.

This should work, but a new version of JuliaPro will have an easy way to switch registries, since this seems to be a common request. Hopefully that will be released next week.

2 Likes

That sounds encouraging. Thanks!

About how long did it take to clone the git registries, mine has been running for 20 minutes now with no sign of progress…

@avik did that new version of JuliaPro come out yet with easy way to switch registries?
I just installed version 1.1.1.1 and I can’t find any documentation on how to use General.