Cannot update package (but Pkg claims new version is avaiable)

I am not super fuzzed about having the latest version of OhMyREPL. However, I kind of would want to know what is going on here. Pkg seems to claim that a new version is available, and that there is nothing stopping me from updating it. Yet, however I try, I seem to be unable to update it?

Below is an example workflow from a new Julia session in my global environment:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.5 (2025-04-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.11) pkg> st
Status `~/.julia/environments/v1.11/Project.toml`
  [7073ff75] IJulia v1.29.0
  [5903a43b] Infiltrator v1.9.2
  [98e50ef6] JuliaFormatter v2.1.2
⌃ [5fb14364] OhMyREPL v0.5.29
  [295af30f] Revise v3.8.0
Info Packages marked with ⌃ have new versions available and may be upgradable.

(@v1.11) pkg> update OhMyREPL
    Updating registry at `~/.julia/registries/General.toml`
  No Changes to `~/.julia/environments/v1.11/Project.toml`
  No Changes to `~/.julia/environments/v1.11/Manifest.toml`

(@v1.11) pkg> st
Status `~/.julia/environments/v1.11/Project.toml`
  [7073ff75] IJulia v1.29.0
  [5903a43b] Infiltrator v1.9.2
  [98e50ef6] JuliaFormatter v2.1.2
⌃ [5fb14364] OhMyREPL v0.5.29
  [295af30f] Revise v3.8.0
Info Packages marked with ⌃ have new versions available and may be upgradable.

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

(@v1.11) pkg> st
Status `~/.julia/environments/v1.11/Project.toml`
  [7073ff75] IJulia v1.29.0
  [5903a43b] Infiltrator v1.9.2
  [98e50ef6] JuliaFormatter v2.1.2
⌃ [5fb14364] OhMyREPL v0.5.29
  [295af30f] Revise v3.8.0
Info Packages marked with ⌃ have new versions available and may be upgradable.

julia> VERSION
v"1.11.5"

To me, this shouldn’t be possible, which probably means there is a useful lesson for me to know what I am missing about how package versions works.

2 Likes

The ^ mark doesn’t necessarily mean there is nothing stopping it from being upgraded (though maybe it should, if that is feasible).
In your case, JuliaFormatter requires JuliaSyntax 0.4, and OhMyREPL requires JuliaSyntax 1.0

One way of checking it is to figure out what the latest version of OhMyREPL is, and then upgrade to that version specifically. E.g. try update OhMyREPL @0.5.31

2 Likes

I had the same issue and saw that the new version for OhMyREPL is 0.5.31:

julia> using Pkg
julia> Pkg.status(; outdated = true)
⌃ [5fb14364] OhMyREPL v0.5.29 (<v0.5.31)

So adding that specific version manually did the trick (plus restart):

julia> Pkg.add(; name = "OhMyREPL", version = "0.5.31")
1 Like

Sounds good, thanks a lot! A quick follow-up question though, isn’t there a yellow type arrow (maybe with a roof) that sometimes is used to indicate that a new version is available but incompatible? Why is that one not used in this case, because it seems to be the case?

(As a side note, in this case it would probably be good to at least have a print out explaining that some updates could not be made, maybe I will raise that as an issue to Pkg)

… but there is an issue with JuliaFormatter. The version 2.1.2 seems to be incompatible with OhMyREPL@0.5.31. If I manually add that version, JuliaFormatter will be downgraded to v1.0.62.

1 Like

The arrow color is based on an overly simplistic check because resolving fully to prove that an update is installable is somewhat expensive.

3 Likes

Try add-ing an updated version manually. It may not always work, I’ve had ⌃ [295af30f] Revise v3.7.5 sitting in my 1.11 environment for a while, and trying to upgrade it to the nearest v3.7.6 informs me JuliaInterpreter via JET makes it impossible.

Am I missing something here, it didn’t take that long to prove that adding 3.7.6 was impossible. Or is it about having to check all versions above that as well and all packages in the project?

1 Like

IIUC, the arrow with the roof means it can’t be installed due to compat bounds in your project, directly or indirectly. E.g. if your Project.toml specified JuliaFormatter = "2", then that is incompatible with OhMyREPL 0.5.31 and you should get the blocked arrow. If you don’t have compat bounds blocking it, then you can’t be on the latest of both packages but neither is being ruled-out by your compat so they don’t get the blocked arrow. At least that is my understanding.

edit: looking at the source code I think my understanding was wrong. The arrow with roof should appear if any package (or your compat bounds) is holding it back due to compat, I don’t think there’s any need for that package’s version to stem from your project’s compat bounds. So I’m not sure why it doesn’t appear here.


btw, Add a tip when trying to upgrade a specific package that's possible to upgrade, just not optimal by IanButterworth · Pull Request #4266 · JuliaLang/Pkg.jl · GitHub adds a nice tip to help in this situation where you do update and see no changes.

2 Likes

Thanks everyone, this has all been very useful. Seems like it is a case of that the yellow arrow would have been more appropriate, but the heuristic for determining it is not complete and so a green arrow was shown again?