Restore uncached version of moi_function#4189
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4189 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 42 42
Lines 6258 6277 +19
=======================================
+ Hits 6254 6273 +19
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
We should document precisely that Having this very subtle behavior with aliases just be undocumented could be quite confusing. Especially since now agents will like tweaking with JuMP internals directly so they will probably like just calling |
|
One thing that worries me with option 1 is that we might forget to call |
|
See also #4190 Agree that we need to think about this in a lot more detail. |
|
Merging this since it fixes a breaking change. We can think more about it in #4190 |
#4032 broke Plasmo because Plasmo calls
moi_function(f::GenericNonlinearExpr).We could have fixed this with
moi_function(f) = moi_function(owner_model(f), f), but this is still breaking ifowner_model(f)isn't aJuMP.GenericModel.It seems safest just to restore the old function. The subexpression caching is opt-in for now.
https://github.com/jump-dev/JuMP.jl/actions/runs/28488003220