Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep for v0.17.0 #264

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Prep for v0.17.0 #264

merged 1 commit into from
Aug 22, 2024

Conversation

odow
Copy link
Member

@odow odow commented Apr 9, 2024

I'm open to a discussion on whether this should be v0.16.3 or v0.17.0.

The argument for v0.17.0 is that it is a rather large change: v0.16.2...master

The main breakage risks are #257 and #259.

  • Fix xprs.jl to use Clong instead of Cint #259 is breaking for anyone using the 64( functions in Lib (but they were probably already broken because of the wrong type?)
  • Update wrapper of xprs.h #257 has one breakage, removing

    Xpress.jl/src/Lib/xprs.jl

    Lines 2366 to 2394 in ceb9df8

    function _getversion()
    buffer = Array{Cchar}(undef, 8 * 24)
    buffer_p = pointer(buffer)
    GC.@preserve buffer begin
    out = Cstring(buffer_p)
    r = Lib.XPRSgetversion(out)
    if r != 0
    throw(XpressError(r, "Unable to invoke XPRSgetversion"))
    end
    version = unsafe_string(out)::String
    end
    return VersionNumber(parse.(Int, split(version, "."))...)
    end
    function XPRSgetglobal(prob, p_nentities, p_nsets, coltype, colind, limit, settype, start, setcols, refval)
    if _getversion() >= v"41.0.0"
    return ccall((:XPRSgetmipentities, libxprs), Cint, (XPRSprob, Ptr{Cint}, Ptr{Cint}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cdouble}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cint}, Ptr{Cdouble}), prob, p_nentities, p_nsets, coltype, colind, limit, settype, start, setcols, refval)
    else
    return ccall((:XPRSgetglobal, libxprs), Cint, (XPRSprob, Ptr{Cint}, Ptr{Cint}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cdouble}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cint}, Ptr{Cdouble}), prob, p_nentities, p_nsets, coltype, colind, limit, settype, start, setcols, refval)
    end
    end
    function XPRSgetglobal64(prob, p_nentities, p_nsets, coltype, colind, limit, settype, start, setcols, refval)
    if _getversion() >= v"41.0.0"
    return ccall((:XPRSgetmipentities64, libxprs), Cint, (XPRSprob, Ptr{Cint}, Ptr{Cint}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cdouble}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cint}, Ptr{Cdouble}), prob, p_nentities, p_nsets, coltype, colind, limit, settype, start, setcols, refval)
    else
    return ccall((:XPRSgetglobal64, libxprs), Cint, (XPRSprob, Ptr{Cint}, Ptr{Cint}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cdouble}, Ptr{UInt8}, Ptr{Cint}, Ptr{Cint}, Ptr{Cdouble}), prob, p_nentities, p_nsets, coltype, colind, limit, settype, start, setcols, refval)
    end
    end
    You now must explicitly call XPRSgetmipentities or XPRSgetglobal, but this shouldn affect only people hacking at the C API.

I've also moved a bunch of unused stuff to src/api.jl which was never tested, so there's a risk I made a mistake during the refactoring that wasn't caught because of the lack of tests.

TODO

@odow
Copy link
Member Author

odow commented May 13, 2024

Bump

@odow
Copy link
Member Author

odow commented Jul 31, 2024

Bump @joaquimg

@odow odow merged commit c885d03 into master Aug 22, 2024
14 checks passed
@odow odow deleted the odow-patch-1 branch August 22, 2024 19:17
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.

1 participant