Skip to content

JuMP v1.32.0 breaks polygon on Julia lts #438

Description

@MaxenceGollier

Hi @amontoison, do you know who I can tag from JuMP for this kind of issue ?

Describe the example

The polygon problem fails to run on lts.
This breaks the documentation build of ADNLPModels.jl.
The problematic commit is this one I think: jump-dev/JuMP.jl@adfac90.

Minimal Reproducible Example 👇

using OptimizationProblems, OptimizationProblems.PureJuMP

PureJuMP.polygon(n = 1000)

Error & Stacktrace ⚠️

ERROR: MethodError: no method matching typemax(::Type{Irrational{:π}})

Closest candidates are:
  typemax(::Type{Base.TCSETATTR_FLAGS})
   @ Base Enums.jl:217
  typemax(::Type{LibGit2.Error.Class})
   @ LibGit2 Enums.jl:217
  typemax(::Type{MathOptInterface.FileFormats.MPS.Headers})
   @ MathOptInterface Enums.jl:217
  ...

Stacktrace:
  [1] typemax(x::Irrational{:π})
    @ Base ./float.jl:957
  [2] _is_typemax(x::Irrational{:π})
    @ JuMP ~/.julia/packages/JuMP/fQTIY/src/variables.jl:146
  [3] JuMP.VariableInfo(has_lb::Bool, lower_bound::Int64, has_ub::Bool, upper_bound::Irrational{…}, has_fix::Bool, fixed_value::Float64, has_start::Bool, start::Float64, binary::Bool, integer::Bool)
    @ JuMP ~/.julia/packages/JuMP/fQTIY/src/variables.jl:189
  [4] macro expansion
    @ ~/.julia/packages/JuMP/fQTIY/src/macros/@variable.jl:336 [inlined]
  [5] (::OptimizationProblems.PureJuMP.var"#1337#1339"{Int64, JuMP.Model})(i::Int64)
    @ OptimizationProblems.PureJuMP ~/.julia/packages/JuMP/fQTIY/src/Containers/macro.jl:604
  [6] #86
    @ ~/.julia/packages/JuMP/fQTIY/src/Containers/container.jl:85 [inlined]
  [7] iterate
    @ ./generator.jl:47 [inlined]
  [8] collect(itr::Base.Generator{JuMP.Containers.VectorizedProductIterator{Tuple{Base.OneTo{…}}}, JuMP.Containers.var"#86#87"{OptimizationProblems.PureJuMP.var"#1337#1339"{Int64, JuMP.Model}}})
    @ Base ./array.jl:834
  [9] map
    @ ./abstractarray.jl:3314 [inlined]
 [10] container
    @ ~/.julia/packages/JuMP/fQTIY/src/Containers/container.jl:85 [inlined]
 [11] container
    @ ~/.julia/packages/JuMP/fQTIY/src/Containers/container.jl:71 [inlined]
 [12] container
    @ ~/.julia/packages/JuMP/fQTIY/src/Containers/container.jl:75 [inlined]
 [13] macro expansion
    @ ~/.julia/packages/JuMP/fQTIY/src/macros.jl:425 [inlined]
 [14] polygon(; n::Int64, kwargs::@Kwargs{})
    @ OptimizationProblems.PureJuMP ~/OptimizationProblems.jl/src/PureJuMP/polygon.jl:7
 [15] top-level scope
    @ REPL[4]:1
Some type information was truncated. Use `show(err)` to see complete types.

Broken Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
Project OptimizationProblems v0.9.3
Status `~/OptimizationProblems.jl/Project.toml`
  [a93c6f00] DataFrames v1.8.2
  [033835bb] JLD2 v0.6.7
  [4076af6c] JuMP v1.32.0
  [ae029012] Requires v1.3.1
  [276daf66] SpecialFunctions v2.9.0
  [37e2e46d] LinearAlgebra
  [2f01184e] SparseArrays v1.10.0
  • Output of versioninfo()
Julia Version 1.10.12
Commit d93beab124c (2026-08-15 10:29 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

Working Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
Project OptimizationProblems v0.9.3
Status `~/OptimizationProblems.jl/Project.toml`
  [a93c6f00] DataFrames v1.8.2
  [033835bb] JLD2 v0.6.7
⌃ [4076af6c] JuMP v1.31.1
  [ae029012] Requires v1.3.1
  [276daf66] SpecialFunctions v2.9.0
  [37e2e46d] LinearAlgebra
  [2f01184e] SparseArrays v1.10.0
Info Packages marked with ⌃ have new versions available and may be upgradable.
  • Output of versioninfo()
Julia Version 1.10.12
Commit d93beab124c (2026-08-15 10:29 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

Additional context

Add any other context about the problem here.

Activity

  1. amontoison commented on Oct 6, 2026

    @amontoison
    Member

    You need the JuMP wizard 🧙‍♂️
    cc @odow

  2. odow commented on Oct 6, 2026

    @odow

    Oops. I see the problem. Let me work on a fix! Sorry for the breakage!!!

  3. odow commented on Oct 6, 2026

    @odow

    I have a PR jump-dev/JuMP.jl#4266

    I'll get a release out ASAP because this is both a MethodError on v1.10 and a silent correctness error on newer version 😢

    There is no work-around (other than changing your code to not use \pi).

  4. amontoison commented on Oct 6, 2026

    @amontoison
    Member

    Thank you Oscar for the quick fix! 💯

  5. odow commented on Oct 7, 2026

    @odow

    This will be fixed by JuliaRegistries/General#170834

  6. MaxenceGollier commented on Oct 7, 2026

    @MaxenceGollier
    ContributorAuthor

    Thank you @odow !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions