Pkg update downgrade JuMP

Hi,

When I add JuMP and GLPK I get this:

(v1.1) pkg> st
    Status `~/.julia/environments/v1.1/Project.toml`
  (empty environment)

(v1.1) pkg> add JuMP GLPK
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [60bf3e95] + GLPK v0.11.0
  [4076af6c] + JuMP v0.18.6
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  ...

When I add JuMP I have the latest version of JuMP, if I add GLPK and update I get this:

(v1.1) pkg> st
   Status `~/.julia/environments/v1.1/Project.toml`
 (empty environment)

(v1.1) pkg> add JuMP
Resolving package versions...
 Updating `~/.julia/environments/v1.1/Project.toml`
 [4076af6c] + JuMP v0.19.2
 Updating `~/.julia/environments/v1.1/Manifest.toml`
 ...

(v1.1) pkg> add GLPK
Resolving package versions...
 Updating `~/.julia/environments/v1.1/Project.toml`
 [60bf3e95] + GLPK v0.10.0
 Updating `~/.julia/environments/v1.1/Manifest.toml`
 [60bf3e95] + GLPK v0.10.0
 [f8899e07] + LinQuadOptInterface v0.6.0

(v1.1) pkg> update
 Updating registry at `~/.julia/registries/General`
 Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
 Updating `~/.julia/environments/v1.1/Project.toml`
 [60bf3e95] ↑ GLPK v0.10.0 ⇒ v0.11.0
 [4076af6c] ↓ JuMP v0.19.2 ⇒ v0.18.6
 Updating `~/.julia/environments/v1.1/Manifest.toml`
 [6e4b80f9] + BenchmarkTools v0.4.2
 [60bf3e95] ↑ GLPK v0.10.0 ⇒ v0.11.0
 [682c06a0] + JSON v0.21.0
 [4076af6c] ↓ JuMP v0.19.2 ⇒ v0.18.6
 [f8899e07] - LinQuadOptInterface v0.6.0
 [b8f27783] ↑ MathOptInterface v0.8.4 ⇒ v0.9.0
 [fdba3010] + MathProgBase v0.7.7
 [69de0a69] + Parsers v0.3.6
 [89212889] + ReverseDiffSparse v0.8.6

That doesn’t seems normal. I want the latest version of JuMP, how can I do that? Should I pin it before any update?

It seems to be a pug in Pkg. It shouldn’t downgrade a package to be able to upgrade another one.
You should either pin GLPK at v0.10 or pin JuMP at v0.19.2 or pin JuMP at this branch: https://github.com/JuliaOpt/JuMP.jl/pull/2003

1 Like

Put

[compat]
JuMP = "0.19"

in your project file. The fact that it isn’t there now means that you are as happy with JuMP at 0.18 as 0.19.

1 Like

Thank you both for your answers. I’ll make this change in my project file then.