Package updated but not available (12 hours latter)

Yesterday I released a new patch version of a package. It is still not available here for update.

(@v1.6) pkg> up ComplexMixtures
    Updating registry at `~/.julia/registries/General`
  No Changes to `~/.julia/environments/v1.6/Project.toml`
  No Changes to `~/.julia/environments/v1.6/Manifest.toml`

(@v1.6) pkg> status ComplexMixtures
      Status `~/.julia/environments/v1.6/Project.toml`
  [6f35c628] ComplexMixtures v0.4.20

There is something going wrong with the the repository?

Hmm… Everything looks fine

(tmp) pkg> add ComplexMixtures
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
   Installed ProgressMeter ─── v1.6.2
   Installed ThreadPools ───── v1.2.1
   Installed FortranFiles ──── v0.6.0
   Installed PDBTools ──────── v0.12.10
   Installed Chemfiles_jll ─── v0.9.3+1
   Installed Chemfiles ─────── v0.9.3
   Installed ComplexMixtures ─ v0.4.21

Have you tried to add it in fresh project? Are you using GitHub version of the package or dev?

1 Like

The only thing that worked is to add the version explicitly:

(NEWTEST) pkg> add ComplexMixtures#v0.4.21
     Cloning git-repo `https://github.com/m3g/ComplexMixtures.jl.git`
   Resolving package versions...
    Updating `~/Drive/Work/JuliaPlay/NEWTEST/Project.toml`
  [6f35c628] ~ ComplexMixtures v0.4.20 β‡’ v0.4.21 `https://github.com/m3g/ComplexMixtures.jl.git#v0.4.21`
    Updating `~/Drive/Work/JuliaPlay/NEWTEST/Manifest.toml`
  [6f35c628] ~ ComplexMixtures v0.4.20 β‡’ v0.4.21 `https://github.com/m3g/ComplexMixtures.jl.git#v0.4.21`
Precompiling project...
  1 dependency successfully precompiled in 4 seconds (21 already precompiled)

(NEWTEST) pkg> status ComplexMixtures
      Status `~/Drive/Work/JuliaPlay/NEWTEST/Project.toml`
  [6f35c628] ComplexMixtures v0.4.21 `https://github.com/m3g/ComplexMixtures.jl.git#v0.4.21`

But by default the previous version is installed still:

(@v1.6) pkg> remove ComplexMixtures
    Updating `~/.julia/environments/v1.6/Project.toml`
  [6f35c628] - ComplexMixtures v0.4.20
    Updating `~/.julia/environments/v1.6/Manifest.toml`
  [6f35c628] - ComplexMixtures v0.4.20

(@v1.6) pkg> status ComplexMixtures
  No Matches in `~/.julia/environments/v1.6/Project.toml`

(@v1.6) pkg> add ComplexMixtures
    Updating registry at `~/.julia/registries/General`
   Resolving package versions...
    Updating `~/.julia/environments/v1.6/Project.toml`
  [6f35c628] + ComplexMixtures v0.4.20
    Updating `~/.julia/environments/v1.6/Manifest.toml`
  [6f35c628] + ComplexMixtures v0.4.20

(@v1.6) pkg> activate NEWTEST
  Activating environment at `~/Drive/Work/JuliaPlay/NEWTEST/Project.toml`

(NEWTEST) pkg> add ComplexMixtures
   Resolving package versions...
    Updating `~/Drive/Work/JuliaPlay/NEWTEST/Project.toml`
  [6f35c628] + ComplexMixtures v0.4.20
    Updating `~/Drive/Work/JuliaPlay/NEWTEST/Manifest.toml`
  [b99e7846] + BinaryProvider v0.5.10
  [46823bd8] + Chemfiles v0.9.3
  [6f35c628] + ComplexMixtures v0.4.20

Silly question on my side, maybe, but…

I notice that it says Activating environment ..., not β€œnew environment”. So there was already a Project.toml in that environment. Could it be that it contained some other dependency incompatible with the newest version of ComplexMixtures?

1 Like

Nope (probably that was that I ran the command twice for some copy/pasting that I forgot):

(@v1.6) pkg> activate yetanothernewtest
  Activating new environment at `~/Drive/Work/JuliaPlay/yetanothernewtest/yetanothernewtest/Project.toml`

(yetanothernewtest) pkg> add ComplexMixtures
    Updating registry at `~/.julia/registries/General`
   Resolving package versions...
    Updating `~/Drive/Work/JuliaPlay/yetanothernewtest/yetanothernewtest/Project.toml`
  [6f35c628] + ComplexMixtures v0.4.20
...

Tip: use pkg> activate --temp to get a guaranteed fresh environment, every time.

Is version 0.4.21 available in ~/.julia/registries/General/C/ComplexMixtures/Versions.toml? If no, your problem is that your registry isn’t up to date, possibly because your package server is lagging with updates. If yes, dependency problems in your environment would usually be the likely suspect.

And is your copy of the registry correctly updated? Your output does not show the line

Updating git-repo `https://github.com/JuliaRegistries/General.git

after Updating registry…

That is normal if getting the registry from a package server rather than from git. And indeed, switching to a git provided registry is one way of working around a lagging package server.

2 Likes

Nice, but with the same result.

No, it is not.

It does not indeed:

(@v1.6) pkg> activate --temp
  Activating new environment at `/tmp/jl_r1EeFt/Project.toml`

(jl_r1EeFt) pkg> add ComplexMixtures
    Updating registry at `~/.julia/registries/General`
   Resolving package versions...
    Updating `/tmp/jl_r1EeFt/Project.toml`
  [6f35c628] + ComplexMixtures v0.4.20
    Updating `/tmp/jl_r1EeFt/Manifest.toml`
  [b99e7846] + BinaryProvider v0.5.10
...

any way to sort that out? I updated everything already.

Your answer was no, so that clause doesn’t apply.

To switch to a git provided registry, run Julia with the environment variable JULIA_PKG_SERVER set to "" (empty string) and do

pkg> registry rm General
pkg> registry add General
1 Like

That did the trick. Where ever my registry could have changed? (I never did that).

With some Windows exceptions, Julia 1.5 and 1.6 will use a package server by default, including for the registry. So unless your Julia depot was created by an earlier version, it’s expected that your registry is package server provided.

1 Like

that may well be it, thanks