Registry dirty


#1

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]

Genie.jl ERROR: Unsatisfiable requirements detected for package WebSockets
Why do the packages folders get dirty/broken so easily?
Fix "Warning: Some packages (...) are not downloaded"?
#2

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.


#3

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

#4

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


#5

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).


#6

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!


#7

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


#8

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]

#9

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


#10

The problems seem to be that there are two directories with different casing: QRUpdate and QRupdate: https://github.com/JuliaRegistries/General/tree/master/Q.

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


#11

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


#12

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.


#13

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?


#14

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.


#15

It works again. Thanks for fixing.


#16

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 ?


#17

Have you tried with latest release Julia v1.0.2 ?


Pkg.update() doesn't update
#18

Update to 1.0.2 or delete the whole registries folder.


#19

@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:


#20

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