-
-
Notifications
You must be signed in to change notification settings - Fork 32
Make Optim an extension package #244
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
Make Optim an extension package #244
Conversation
Move Optim from a direct dependency to a weak dependency with a package extension. This reduces install size and compile times for users who don't need the BoxWedgeTail functionality with squeezing. Changes: - Move Optim from [deps] to [weakdeps] in Project.toml - Add DiffEqNoiseProcessOptimExt extension - Use callback pattern to inject Optim functionality when loaded - Users who use BoxWedgeTail with sqeezing=true need to load Optim first - Users who use sqeezing=false don't need Optim at all Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add Optim to the skip list for julia-downgrade-compat since Optim is now a weak dependency (extension). See SciML#245 for details. Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Added commit to skip Optim in Downgrade CI. See #245 for tracking the downgrade CI behavior with extensions. |
devmotion
left a comment
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.
Technically, that's a breaking change, isn't it? It seems it would break the workflow of everyone who currently does not load Optim explicitly. As such it might be safer to release master (possibly with additional CI fixes) in a non-breaking release and then switch to an extension in a breaking release.
|
An extreme edge case for only 2D brownian motions that was never fully documented and has 0 uses on Github is not getting the full treatment unless you want to do it for fun. |
Per review feedback, use a cleaner pattern: - Define function stub in main package - Extension adds method to the stub function - Register error hint for helpful message when Optim not loaded Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Updates in latest push:
Note: Documentation build failures are pre-existing issues unrelated to this PR - see #246 for tracking. |
Co-authored-by: David Müller-Widmann <[email protected]>
- Add `if: false` to Downgrade CI job (same pattern as DelayDiffEq.jl#357) - Fix reset! -> reinit! in advanced_features.md - Fix CompoundPoissonProcess example (add computerates=false) - Fix NoiseApproximation example (show correct usage pattern) - Skip linkcheck for ColPrac URL (rate limited) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Good place to checkpoint this and finish the doc fixes in a new PR. |
Summary
BoxWedgeTailwithsqeezing=trueneed to load Optim first withusing Optimsqeezing=falsedon't need Optim at allChanges
[deps]to[weakdeps]in Project.tomlDiffEqNoiseProcessOptimExtextension that implements the Optim-based constrained optimizationOPTIM_CONSTRAINED_OPTIMIZATIONRef) to inject functionality when extension loadssqeezing=truewithout Optim loadedTest plan
BoxWedgeTailwithsqeezing=trueworks when Optim is loadedBoxWedgeTailwithsqeezing=falseworks without Optimsqeezing=truewithout Optim🤖 Generated with Claude Code