infiniteopt / InfiniteOpt.jl

An intuitive modeling interface for infinite-dimensional optimization problems.
https://infiniteopt.github.io/InfiniteOpt.jl/stable
MIT License
251 stars 17 forks source link

Fix printing in JuMP v1.11.1 #314

Closed odow closed 1 year ago

odow commented 1 year ago

The upcoming JuMP 1.11.1 tweaks how we do printing. I'm not really sure if this is a "breaking" change or not, because it affects only the tests of InfiniteOpt, and the exact string that is printed isn't part of the API contract.

What's weird is that I couldn't reproduce the failures: https://github.com/jump-dev/JuMP.jl/pull/3350#issuecomment-1542915469

codecov[bot] commented 1 year ago

Codecov Report

Merging #314 (3ad1dc8) into master (a66bbde) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #314   +/-   ##
=======================================
  Coverage   99.77%   99.77%           
=======================================
  Files          36       36           
  Lines        7099     7099           
=======================================
  Hits         7083     7083           
  Misses         16       16           
pulsipher commented 1 year ago

The remaining errors all stem from JuMP.check_belongs_to_model not throwing an error when expected on Julia 1.9. In particular, the following test fails: https://github.com/infiniteopt/InfiniteOpt.jl/blob/a66bbded1ecd40f28906cca6dc17378865cdb920/test/point_variables.jl#L350-L357 which causes the subsequent checks to fail since a variable is unexpected added to the model at first. This test is intended to trigger the JuMP.check_belongs_to_model here: https://github.com/infiniteopt/InfiniteOpt.jl/blob/a66bbded1ecd40f28906cca6dc17378865cdb920/src/point_variables.jl#L423-L432 I am not quite sure why this is happening, but I will have some more time later to investigate.

odow commented 1 year ago

See #315.

I have a fix that works locally: https://github.com/infiniteopt/InfiniteOpt.jl/pull/316

odow commented 1 year ago

That seems to have fixed the v1.9 issue, now the tests fail as expected because of the printing.

odow commented 1 year ago

So I guess the question is: are you okay if we release https://github.com/jump-dev/JuMP.jl/pull/3350?

pulsipher commented 1 year ago

So I guess the question is: are you okay if we release jump-dev/JuMP.jl#3350?

Go ahead, no worries

pulsipher commented 1 year ago

Requires #316 for 1.9 tests to pass

pulsipher commented 1 year ago

Merging now that julia 1.6 and docs pass the testing