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

Julia 0.7 #100

Merged
merged 17 commits into from
May 6, 2018
Merged

Julia 0.7 #100

merged 17 commits into from
May 6, 2018

Conversation

kalmarek
Copy link
Collaborator

@kalmarek kalmarek commented May 4, 2018

this is an almost automatic port to julia-0.7; The only notable change is how kwargs are handled (as NamedTuple)

deps/build.jl Outdated
@@ -2,13 +2,16 @@ using BinDeps

@BinDeps.setup

blasvendor = Base.BLAS.vendor()
using Libdl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may need Compat for Libdl, LinearAlgebra, and Sys

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, but to be honest I don't know what to do with NamedTuples, as on 0.6 we get

julia> (x=1,)
ERROR: syntax: assignment not allowed inside tuple

@kalmarek
Copy link
Collaborator Author

kalmarek commented May 5, 2018

after reading the very long discussion in JuliaLang/julia#22194 I am not sure if NamedTuples will be ever supported by Compat...

Any idea how to support both 0.6 and 0.7?

@mlubin
Copy link
Member

mlubin commented May 5, 2018

What's the situation where you need to use NamedTuples? We haven't had an issue with this for other solvers.

@kalmarek
Copy link
Collaborator Author

kalmarek commented May 6, 2018

hmm I manipulate m.options directly, e.g. in setwarmstart!, see 9e7bd4e

Maybe there is a better way?
Which solvers are already running on 0.7 using Compat?

@mlubin
Copy link
Member

mlubin commented May 6, 2018

You can define an addoption! function, e.g.,

if VERSION >= v"0.7-"
    addoption!(options, name, value) = ...
else
    addoption!(options, name, value) = ...
end

If the 0.7 version doesn't parse on 0.6, you can wrap it in eval(parse()).

ECOS is passing on nightly travis.

src/types.jl Outdated
@@ -68,7 +68,7 @@ struct SCSData
stgs::Ptr{SCSSettings}
end

struct SCSSolution
@compat struct SCSSolution
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This @compat shouldn't be needed.

@mlubin
Copy link
Member

mlubin commented May 6, 2018

LGTM, thanks!

@mlubin mlubin merged commit b149b73 into jump-dev:master May 6, 2018
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