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

Add return_is_mutable kwarg to MA.rewrite #312

Merged
merged 1 commit into from
Nov 17, 2024
Merged

Add return_is_mutable kwarg to MA.rewrite #312

merged 1 commit into from
Nov 17, 2024

Conversation

odow
Copy link
Member

@odow odow commented Nov 14, 2024

Required for jump-dev/JuMP.jl#3882

JuMP needs the ability to tell if it is safe to mutate the returned expression.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.29%. Comparing base (d47000d) to head (d075a09).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #312      +/-   ##
==========================================
- Coverage   90.42%   90.29%   -0.14%     
==========================================
  Files          22       22              
  Lines        2224     2235      +11     
==========================================
+ Hits         2011     2018       +7     
- Misses        213      217       +4     

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

if move_factors_into_sums
@assert !return_is_mutable
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this going to be an issue if JuMP starts using return_is_mutable = true ?

Copy link
Member Author

Choose a reason for hiding this comment

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

JuMP uses move_factors_into_sums = false

@odow odow merged commit 6184cc0 into master Nov 17, 2024
9 of 11 checks passed
@odow odow deleted the od/is-mutable branch November 17, 2024 19:01
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.

2 participants