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

🏴‍☠️ Remove type piracy 🏴‍☠️ #101

Closed
odow opened this issue Nov 18, 2021 · 1 comment · Fixed by #113
Closed

🏴‍☠️ Remove type piracy 🏴‍☠️ #101

odow opened this issue Nov 18, 2021 · 1 comment · Fixed by #113

Comments

@odow
Copy link
Contributor

odow commented Nov 18, 2021

Please don't do this:

# FIXME: type piracy. Needs https://github.com/jump-dev/MathOptInterface.jl/issues/1310
function MOI.get(optimizer::MOIU.CachingOptimizer, attr::MOI.ConstraintPrimal, ci::MOI.ConstraintIndex)
# FIXME `get_fallback` should do this first line
MOI.check_result_index_bounds(optimizer, attr)
return MOI.Utilities.get_fallback(optimizer, attr, ci)
end

Not sure why it's implemented, but we're considering something similar: jump-dev/MathOptInterface.jl#1310

@blegat
Copy link
Collaborator

blegat commented Nov 18, 2021

This is the reason, note that the same issue is mentioned in the comment line 56.

odow added a commit to odow/OSQP.jl that referenced this issue Jun 28, 2022
This was added to MOI upstream in v0.10.5. Closes osqp#101
blegat pushed a commit that referenced this issue Jun 30, 2022
This was added to MOI upstream in v0.10.5. Closes #101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants