Skip to content

Prep for v0.18.0#313

Merged
odow merged 1 commit into
masterfrom
od/v0.18.0
Apr 23, 2026
Merged

Prep for v0.18.0#313
odow merged 1 commit into
masterfrom
od/v0.18.0

Conversation

@odow
Copy link
Copy Markdown
Member

@odow odow commented Apr 21, 2026

Since it is such a large breaking release, I wrote some proper release notes.

Release notes v0.18.0

This is a large breaking release. The purpose of this release was to clean up a
lot of the wrapper by removing the intermediate API between MathOptInterface and
C.

These changes are motivated by our experience maintaining other solver wrappers:
the fewer layers of indirection between MOI and the solver the better, even if
the code is more verbose. In particular, macros seem like they make things
easier to read, but they distract from the code that actually runs. And helper
functions that automate some of the handling of C arguments like Ref{Cint}
obscure the underlying C calls.

Breaking

  • Support for Xpress v8 and earlier has been removed. There are no work-arounds.
    The only supported versions are minor and patch releases in the Xpress v9
    series.

  • Droped support for Julia@1.6 and make minimum v1.10 (Drop support for Julia@1.6 and make minimum v1.10 #297)

    This change is technically not breaking because users on v1.6 will not be able
    to upgrade to this version, but it is worth advertising.

  • [breaking] simplify the wrapper by removing the intermediate API ([breaking] simplify the wrapper by removing the intermediate API #298)

    This PR is breaking for any code that touched the Xpress.Lib submodule, any
    code in src/api.jl, or any code that used @_invoke or @checked.

    There are no simple work-arounds. Instead, you must rewrite your code to use
    the underlying C API directly.

    As an example, instead of

    using Xpress
    prob = Xpress.XpressProblem()
    value = Xpress.getintcontrol(prob, Xpress.XPRS_OUTPUTFLAG)

    do

    using Xpress
    prob = Xpress.XpressProblem()
    pInt = Ref{Cint}(0)
    ret = XPRSgetintcontrol(prob, XPRS_OUTPUTFLAG, pInt)
    @assert ret == 0  # Check error code
    value = pInt[]

    If you need help updating your code, please open a GitHub isssue and tag
    @odow.

  • [breaking] remove kwargs from Optimizer constructor ([breaking] remove kwargs from Optimizer constructor #300)

    This PR removed the ability to set options via Xpress.Optimizer(; kwargs...).
    Use JuMP.set_attribute or MOI.RawOptimizerAttribute instead. We made this
    change to align with the rest of the JuMP ecosystem.

  • [breaking] remove incorrect set_callback_preintsol ([breaking] remove incorrect set_callback_preintsol #309)

    This PR removed Xpress.set_callback_preintsol. You can still set this
    callback manually using XPRSaddcbpreintsol. We removed this function because
    it wasn't used by the MOI wrapper, and it did not expose the full capabilities
    of the underlying callback.

  • [breaking] remove set_callback_optnode! ([breaking] remove set_callback_optnode! #310)

    This PR removed Xpress.set_callback_optnode!. You can still set this
    callback manually using XPRSaddcboptnode, or by setting the
    Xpress.CallbackFunction attribute. We removed this function because
    it could equivalently be called by CallbackFunction, and it did not expose
    the full capabilities of the underlying callback.

  • [breaking] move logfile field from XpressProblem to Optimizer (Move logfile field from XpressProblem to Optimizer #312)

    The XpressProblem(; logfile) keyword argument has been removed. If you are
    using the C API, call XPRSsetlogfile instead. If you are using the MOI
    wrapper, set the "logfile" attribute.

Added

Previously this was supported by a bridge adding two constraints: f(x) <= a and f(x) >= a.

Fixed

  • Switch to XPRSoptimize and remove lp/mip/nlp switches (Switch to XPRSoptimize and remove lp/mip/nlp switches #299)

    As a result of this PR, Xpress will now automatically detect the problem type
    and use the appropriate solver. This fixes a bug in which non-convex quadratic
    programs were not supported by the MOI wrapper.

Other

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.61%. Comparing base (2418b88) to head (50c6239).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #313   +/-   ##
=======================================
  Coverage   98.61%   98.61%           
=======================================
  Files           3        3           
  Lines        2591     2591           
=======================================
  Hits         2555     2555           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@odow
Copy link
Copy Markdown
Member Author

odow commented Apr 22, 2026

Dear all, please speak now on these changes. But if you don't, it's also okay. We can re-add any "missing" features in a non-breaking way.

If you use only JuMP/MOI, then this should be non-breaking, other than dropping support for old Xpress versions. In return, it adds many new features and bug fixes, such as support for non-convex quadratics and safe interrupting via CTRL+C.

If you used anything other than JuMP/MOI, you're in trouble. It's effectively rewrite all of your code to the C API. Which should be straight forward, just a little tedious. I can help if the codes are public.

@guilhermebodin
@klamike
@saketadhau
@joaquimg
@jd-lara
@trulsf

@jd-lara
Copy link
Copy Markdown
Collaborator

jd-lara commented Apr 22, 2026

I am ok with this. Go for it

@trulsf
Copy link
Copy Markdown

trulsf commented Apr 22, 2026

All good from our side, We have only used Xpress through JuMP/MOI.

@odow odow merged commit 643815d into master Apr 23, 2026
17 checks passed
@odow odow deleted the od/v0.18.0 branch April 23, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants