JuMP Does Not Precompile

I downloaded Baron (and Pkg.add(“BARON”)) and did a Pkg.update() this morning and since doing that, I’m unable to use JuMP. Does anyone know what might be going on?

Julia Version: Version 0.6.2 (2017-12-13 18:08 UTC)

Warning and then Error messages:

julia> using JuMP

WARNING: deprecated syntax "abstract AbstractModel" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:62.
Use "abstract type AbstractModel end" instead.

WARNING: deprecated syntax "abstract AbstractConstraint" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:319.
Use "abstract type AbstractConstraint end" instead.

WARNING: deprecated syntax "abstract AbstractJuMPScalar" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:322.
Use "abstract type AbstractJuMPScalar end" instead.

WARNING: deprecated syntax "typealias LinConstrRef ConstraintRef{Model,LinearConstraint}" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:547.
Use "const LinConstrRef = ConstraintRef{Model,LinearConstraint}" instead.

WARNING: deprecated syntax "typealias JuMPTypes Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:872.
Use "const JuMPTypes = Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" instead.

WARNING: deprecated syntax "typealias JuMPScalars Union{Number,JuMPTypes}" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:873.
Use "const JuMPScalars = Union{Number,JuMPTypes}" instead.
INFO: Precompiling module JuMP.

WARNING: deprecated syntax "abstract AbstractModel" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:62.
Use "abstract type AbstractModel end" instead.

WARNING: deprecated syntax "abstract AbstractConstraint" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:319.
Use "abstract type AbstractConstraint end" instead.

WARNING: deprecated syntax "abstract AbstractJuMPScalar" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:322.
Use "abstract type AbstractJuMPScalar end" instead.

WARNING: deprecated syntax "typealias LinConstrRef ConstraintRef{Model,LinearConstraint}" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:547.
Use "const LinConstrRef = ConstraintRef{Model,LinearConstraint}" instead.

WARNING: deprecated syntax "typealias JuMPTypes Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:872.
Use "const JuMPTypes = Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" instead.

WARNING: deprecated syntax "typealias JuMPScalars Union{Number,JuMPTypes}" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl:873.
Use "const JuMPScalars = Union{Number,JuMPTypes}" instead.

WARNING: deprecated syntax "abstract JuMPContainer{T,N}" at /Users/shoshievass/.julia/v0.6/JuMP/src/JuMPContainer.jl:10.
Use "abstract type JuMPContainer{T,N} end" instead.
ERROR: LoadError: LoadError: LoadError: invalid subtyping in definition of JuMPArray
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:576
 [2] include(::String) at ./sysimg.jl:14
 [3] include_from_node1(::String) at ./loading.jl:576
 [4] include(::String) at ./sysimg.jl:14
 [5] include_from_node1(::String) at ./loading.jl:576
 [6] include(::String) at ./sysimg.jl:14
 [7] anonymous at ./<missing>:2
while loading /Users/shoshievass/.julia/v0.6/JuMP/src/JuMPArray.jl, in expression starting on line 6
while loading /Users/shoshievass/.julia/v0.6/JuMP/src/JuMPContainer.jl, in expression starting on line 11
while loading /Users/shoshievass/.julia/v0.6/JuMP/src/JuMP.jl, in expression starting on line 55
ERROR: Failed to precompile JuMP to /Users/shoshievass/.julia/lib/v0.6/JuMP.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405

Update: The problem is clearly with BARON.jl. Removing the package resolved the issue. Sad that I can’t use BARON.jl though :frowning: I posted an issue on the github page.

Try Pkg.checkout("BARON"). Looks like they did the updates for 0.6 but never tagged the release.

Unfortunately, it looks like even the master branch of BARON.jl still does not support Julia v0.6: https://github.com/joehuchette/BARON.jl/blob/7e329be8b26ba95e23addc0af07b4b4d4d2c618c/REQUIRE

x-ref: https://github.com/joehuchette/BARON.jl/issues/9

1 Like

Thanks for looking into this!

The code base is pretty tiny, it would probably be quite easy to update it simply by going through the warnings and errors one at a time.

Yup, totally agree. Unfortunately, actually testing it would require a Baron license, which is harder to come by.

1 Like