Registry dirty

Apparently my registry is dirty; how should I clean it?

Julia-1.0.2> Pkg.update()
  Updating registry at `C:\Users\plowman\.julia\registries\General`
┌ Warning: Some registries failed to update:
│     — `C:\Users\plowman\.julia\registries\General` — registry dirty
└ @ Pkg.API C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:157
 Resolving package versions...
  Updating `C:\Users\plowman\.julia\environments\v1.0\Project.toml`
 [no changes]
  Updating `C:\Users\plowman\.julia\environments\v1.0\Manifest.toml`
 [no changes]
6 Likes

You can remove ~/.julia/registires/General and it will be reinstalled. Before you do it would be interesting to see the output of git status in that folder to understand why it became dirty.

8 Likes

OK Thank you.

Is this the output you meant?

C:\Users\plowman\.julia\registries\General>git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        deleted:    Q/QRupdate/Compat.toml
        deleted:    Q/QRupdate/Deps.toml
        deleted:    Q/QRupdate/Package.toml
        deleted:    Q/QRupdate/Versions.toml
2 Likes

Thanks, do you have any idea why those files have been deleted?

The same exact problem happened to me after a package update, for what it’s worth. Deleting the General folder and updating again doesn’t resolve the issue (it’s dirty in the same way after updating).

Unfortunately not.

Somewhat embarrassingly, I have almost no understanding of things git and I don’t manually dabble there.
I literally just use Pkg.add() and Pkg.update().

Removing ~/.julia/registries/General followed by Pkg.update() fixed the problem.
Washed and clean!

Thanks!

2 Likes

Do you mean the QRupdate directory was removed? Or just some directory within General?

same exact problem, the QRupdate directory. When I delete the General registry folder and try updating twice, the following happens:

(v1.0) pkg> up
   Cloning default registries into /Users/ajkeller/.julia/registries
   Cloning registry General from "https://github.com/JuliaRegistries/General.git"
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.0/Manifest.toml`
 [no changes]

(v1.0) pkg> up
  Updating registry at `~/.julia/registries/General`
┌ Warning: Some registries failed to update:
│     — `~/.julia/registries/General` — registry dirty
└ @ Pkg.API /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:157
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.0/Manifest.toml`
 [no changes]
2 Likes

I had the same issue as well. I tried fixing the git repo, but couldn’t for some reason. The solution helped.

However, as soon as I need it again it gets dirty once again…

I am on macOS v10.14.1 and Julia v1.0.2

The problems seem to be that there are two directories with different casing: QRUpdate and QRupdate: General/Q at master · JuliaRegistries/General · GitHub.

A new package was registered (QRUpdate) while there was an existing QRupdate package already existing. This seems to have broken the registry.

2 Likes

I guess because windows and mac filesystems are not case sensitive? Or so I read on the net…

Correct, this should not be allowed. Case-insensitive file systems cannot handle this. The commit on metadata that added a different case of the same name should be reverted and we should add a registration check preventing this.

1 Like

Shouldn’t that happen with the UUID being what determines the package and not the name? This is actually nice, since this is the first time in the registry where there are multiple packages “conflicting” (here is not even the actual same name). I asked shortly before stdlib/Pkg, but I think it is still relevant… The way the registry is set up it stores the files based on the name rather UUID so this could be problematic. Should it be resolved after dropping METADATA and METADATA compatible UUID?

1 Like

No, its stored based on uuid: https://github.com/JuliaRegistries/General/blob/bb6acaa33fa8f38203d393a6e3178c62cd799cb4/Registry.toml#L1830, this was (is) only a problem with the conversion script.

2 Likes

It works again. Thanks for fixing.

I am experiencing the same issue. However, if I delete the folder General, Julia (v1.0.0) does not reinstall it.
In registries/General/Q I do have QRUpdate instead of QRupdate as I understand from the discussion. Manually renaming the folder does not help.
Any idea how to reset the General folder (or simply the QRUpdate one) ? Equivalently, how to ask Julia to re-install General after removing it ?

Have you tried with latest release Julia v1.0.2 ?

Update to 1.0.2 or delete the whole registries folder.

1 Like

@greg_plowman No I did not want to upgrade just yet. I feel that if I do it now, by a year from now I will have many Julia installed and I am not sure how that works.

@kristoffer.carlsson Fantastic, that worked. Thank you very much! What a headache that was for me :slightly_smiling_face:

Upgrading is highly recommended, it contains many bug fixes. You can just uninstall your old julia and install the new one.

1 Like