-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Helpful user message for old objective syntax #1543
Conversation
Why do we need to provide two ways to write the same thing? |
It is not mandatory to support |
Codecov Report
@@ Coverage Diff @@
## master #1543 +/- ##
==========================================
+ Coverage 89.47% 89.48% +<.01%
==========================================
Files 27 27
Lines 3621 3623 +2
==========================================
+ Hits 3240 3242 +2
Misses 381 381
Continue to review full report at Codecov.
|
No, this shouldn't work anymore after #1562. Sense symbols are no longer recognized. You can use MOI sense values instead. |
Shouldn't we add an entry in NEWS.md about that ? |
Yep, done (#1545).
…On Thu, Oct 11, 2018 at 4:08 PM Benoît Legat ***@***.***> wrote:
Sense symbols are no longer recognized
Shouldn't we add an entry in NEWS.md about that ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1543 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABp0M0nMPjDBB3frL8A9FU_zOPr_YT-Bks5uj6VIgaJpZM4XXqE0>
.
|
@mlubin I have replace the support of |
src/macros.jl
Outdated
Return an expression whose value is an `MOI.OptimizationSense` corresponding | ||
to `sense`. Sense is either the symbol `:Min` or `:Max`, corresponding | ||
respectively to `MOI.MinSense` and `MOI.MaxSense` or it is another symbol, | ||
which should be the name of a variable or expression whose value is `:Min`, |
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.
This discussion about :Min
and :Max
is out of date now, right?
src/macros.jl
Outdated
which should be the name of a variable or expression whose value is `:Min`, | ||
`:Max` or an `MOI.OptimizationSense`. | ||
In the last case, the expression throws an error using the `_error` | ||
function in case the value is a symbol which is not `:Min` nor `:Max`. |
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.
Out of date?
src/macros.jl
Outdated
return :(throw_error_for_symbol_sense($_error, $expr)) | ||
end | ||
|
||
# TODO remove for JuMP v0.20 |
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.
Actually something like this should stay, because of the MethodError
principle. What about updating the error message so that it just says what's wrong instead of referring to old JuMP? For example, "Unexpected sense $value. The sense must be an
OptimizatonSense or \"Min\" or \"Max\"."
(Also remove the ::Symbol
filter on the argument type, we want a helpful error if someone gives a sense of 10
.)
Closes #1541