-
Notifications
You must be signed in to change notification settings - Fork 120
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
Deprecated default solvers #249
Deprecated default solvers #249
Conversation
There seems to be an issue with how often this gets called. See for example the number of times the warning is emitted in https://travis-ci.org/JuliaOpt/Convex.jl/jobs/464710210. |
Yeah, I just figured it was an issue with |
Ah, it seems to be because it's used in the default constructor for --- a/src/problems.jl
+++ b/src/problems.jl
@@ -40,7 +40,7 @@ end
# constructor if model is not specified
function Problem(head::Symbol, objective::AbstractExpr, constraints::Array=Constraint[],
- solver::MathProgBase.AbstractMathProgSolver=get_default_solver())
+ solver::MathProgBase.AbstractMathProgSolver=DEFAULT_SOLVER)
Problem(head, objective, MathProgBase.ConicModel(solver), constraints)
end |
I guess if we deprecate the |
2441651
to
04afdf5
Compare
The warning still pops up a lot but it's at least less spammy than before it seems. |
Yeah, looks like the test code is calling |
That's probably not representative of external user/package code, so maybe fine? 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did the depwarn cause a problem when that function was used as a default argument? Is it anything special to do with that, or is depwarn just generally not good at warning only once?
I'm not sure why the depwarn was causing problems, but I have noticed that it isn't very good at only warning once. Maybe it's related to where/how the deprecated function is called? :/ |
It is because It is now fixed, but that fix is only in master, I believe. |
Looks like that made it in to 1.0.2 |
Ah, so it is. |
This seems like the first step to dropping the
DEFAULT_SOLVER
behaviour and getting rid of the following warning:which causes precompilation to fail on 1.0. Related to #244