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

Fix bug which mutates user expressions in constraint macro #3883

Merged
merged 3 commits into from
Nov 15, 2024
Merged

Conversation

odow
Copy link
Member

@odow odow commented Nov 14, 2024

Closes #3882

This is a temporary fix. A longer-term approach is to return the is_mutable::Bool value from MutableArithemtics:
https://github.com/jump-dev/MutableArithmetics.jl/blob/d47000d5e02100458aff33670684a95f105ec40a/src/rewrite.jl#L341
which would let JuMP decide whether it needed to call copy_if_mutable.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.58%. Comparing base (7111683) to head (29ff799).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3883   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          43       43           
  Lines        6029     6036    +7     
=======================================
+ Hits         6004     6011    +7     
  Misses         25       25           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

test/test_macros.jl Outdated Show resolved Hide resolved
test/test_macros.jl Outdated Show resolved Hide resolved
test/test_macros.jl Outdated Show resolved Hide resolved
Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

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

Suprising this went unnoticed

@odow odow merged commit fc0409a into master Nov 15, 2024
11 checks passed
@odow odow deleted the od/fix-mutate branch November 15, 2024 22:32
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.

Bug mutating expression in interval constraint
2 participants