# PSA: Convex.jl default solver deprecation

**URL:** <https://discourse.julialang.org/t/psa-convex-jl-default-solver-deprecation/18570>\
**Category:** Optimization (Mathematical)\
**Created:** [December 11, 2018, 5:55pm UTC](https://discourse.julialang.org/t/psa-convex-jl-default-solver-deprecation/18570 "2018-12-11T17:55:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rory-Finnegan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rory-finnegan/32/226_2.png) [@Rory-Finnegan](https://discourse.julialang.org/u/Rory-Finnegan)\
**Post date:** [December 11, 2018, 5:55pm UTC](https://discourse.julialang.org/t/psa-convex-jl-default-solver-deprecation/18570/1 "2018-12-11T17:55:30Z")

</div>

Support for default solvers in Convex.jl is about to be dropped. For the most part this’ll just require you to explicitly pass a `MathProgBase.AbstractMathProgSolver` as the second argument to `solve!`, if you aren’t already doing so. Reasons for the change include:

1. The current behaviour throws a warning about loading packages that aren’t Convex.jl dependencies
2. Explicitly passing in a solver better aligns with the JuMP API
3. The current default solver logic makes Convex.jl incompatible with system image building

More details are provided in the links below. If anyone has any final comments/concerns, please raise them now.

- [https://github.com/JuliaOpt/Convex.jl/issues/248](https://github.com/JuliaOpt/Convex.jl/issues/248)
- [https://github.com/JuliaOpt/Convex.jl/pull/244](https://github.com/JuliaOpt/Convex.jl/pull/244)
- [https://github.com/JuliaOpt/Convex.jl/pull/249](https://github.com/JuliaOpt/Convex.jl/pull/249)
- [https://github.com/JuliaOpt/Convex.jl/pull/250](https://github.com/JuliaOpt/Convex.jl/pull/250)

---

<div class="post-metadata">

**Author:** ![ararslan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ararslan/32/3825_2.png) [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Post date:** [December 11, 2018, 6:03pm UTC](https://discourse.julialang.org/t/psa-convex-jl-default-solver-deprecation/18570/2 "2018-12-11T18:03:13Z")

</div>

To add to this, note that Convex [v0.9.0](https://github.com/JuliaLang/METADATA.jl/pull/20008) will introduce the deprecation and v0.10.0 will require explicit specification of solvers.

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [December 11, 2018, 6:07pm UTC](https://discourse.julialang.org/t/psa-convex-jl-default-solver-deprecation/18570/3 "2018-12-11T18:07:50Z")

</div>

How are tests (`Pkg.test("Convex")`) going to be handled? As far as I understand, the package directory is scanned and if the package is installed, it runs the test. As it was pointed out, the test fails if the package has been installed and then removed from the project.

---

<div class="post-metadata">

**Author:** ![Rory-Finnegan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rory-finnegan/32/226_2.png) [@Rory-Finnegan](https://discourse.julialang.org/u/Rory-Finnegan)\
**Post date:** [December 11, 2018, 6:18pm UTC](https://discourse.julialang.org/t/psa-convex-jl-default-solver-deprecation/18570/4 "2018-12-11T18:18:03Z")

</div>

`Pkg.test("Convex")` currently iterates over a static set of solvers, so that behaviour didn’t need to change. The only part that we needed to change was how the solver was being accessed. Now the `solver` is a variable in the `@testset` for loops and is passed explicitly along, rather that using `set_default_solver` and `get_default_solver`.

[https://github.com/JuliaOpt/Convex.jl/pull/250/files#diff-fce720c43af3c52c862fd7451c7374b8L11](https://github.com/JuliaOpt/Convex.jl/pull/250/files#diff-fce720c43af3c52c862fd7451c7374b8L11)

---

<div class="post-metadata">

**Author:** ![Rory-Finnegan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rory-finnegan/32/226_2.png) [@Rory-Finnegan](https://discourse.julialang.org/u/Rory-Finnegan)\
**Post date:** [December 12, 2018, 11:37pm UTC](https://discourse.julialang.org/t/psa-convex-jl-default-solver-deprecation/18570/5 "2018-12-12T23:37:44Z")

</div>

Warning: v0.10.0 will be released early next week as this is a fairly blocking issue for us. If you’d like to confirm that this change doesn’t impact you then we recommend running the current master branch.
