JuMP 0.18 in julia v0.7


Currently trying to get my head around Julia v0.7.

I’m not totally sure whether JuMP 0.18 should work in v0.7 or what the current state is. Getting a bit confused with all the different versions lately (v0.6,v0.7, JuMP 0.18,0.19, MPB vs MOI)

I’m using JuMP v0.18.2 and Julia Version 0.7.0-rc2.0

This code doesn’t work:

using JuMP
m = Model()
@variable(m, x[1:10])

Giving this error:

┌ Warning: `Array{T}(m::Int) where T` is deprecated, use `Array{T}(undef, m)` instead.
│   caller = top-level scope at macros.jl:199
└ @ Core ~/.julia/packages/JuMP/6aWu/src/macros.jl:199
ERROR: MethodError: no method matching -(::Base.LegacyIterationCompat{UnitRange{Int64},Int64,Int64}, ::Int64)                                                                                    
Closest candidates are:
  -(::Complex{Bool}, ::Real) at complex.jl:298
  -(::Missing, ::Number) at missing.jl:93
  -(::Base.CoreLogging.LogLevel, ::Integer) at logging.jl:107
 [1] setindex!(::JuMP.JuMPArray{Variable,1,Tuple{UnitRange{Int64}}}, ::Variable, ::Int64) at /home/ole/.julia/packages/JuMP/6aWu/src/JuMPArray.jl:72                                             
 [2] top-level scope at /home/ole/.julia/packages/JuMP/6aWu/src/macros.jl:1111

As this is really basic I suppose it’s known. JuMP v0.19 will depend on MOI, right?
Is there a way to upgrade a solver to v0.7 by updating to v0.7 without worrying about the big change from MPB to MOI?


v0.7 landed at a bit of an awkward time for JuMP, as JuMP itself is under the process of a major overhaul under the name of v0.19. My understanding is that a proper v0.19 release is still a few months off.

In the meantime, certainly many of us will certainly need JuMP working in 0.7. Some work has already been done. I myself have literally just started messing around with updating this today. Note that in the meantime you will want to pull from the release-0.18 branch.


thanks for release-0.18 that works


@miles.lubin, when working on 0.18, can we assume that 0.18.3 (0.7 compatibility patch) will drop 0.6 completely, so that 0.6 users should use 0.18.2 and 0.7 users should use 0.18.3? Not having to maintain backwards compatibility with 0.6 will greatly simplify things.


Unfortunately no, we’d like to maintain compatibility on the release-0.18 branch with both 0.6 and 0.7 for two reasons:

  • We intend to continue making bug fixes on 0.18 for 0.6 users at least until 0.19 is released. Creating a 0.7-only branch of release-0.18 means three branches that we’re then responsible for maintaining (the two 0.18 branches and the 0.19 branch).
  • A new tagged version that drops support for 0.6 needs to be released as 0.19 because of METADATA versioning rules. That version number is already reserved :slight_smile: