Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • 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
  • Users who use BoxWedgeTail with sqeezing=true need to load Optim first with using Optim
  • Users who use sqeezing=false don't need Optim at all

Changes

  • Move Optim from [deps] to [weakdeps] in Project.toml
  • Add DiffEqNoiseProcessOptimExt extension that implements the Optim-based constrained optimization
  • Use a callback pattern (OPTIM_CONSTRAINED_OPTIMIZATION Ref) to inject functionality when extension loads
  • Add helpful error message when trying to use sqeezing=true without Optim loaded
  • Update tests to load Optim where needed

Test plan

  • Verify BoxWedgeTail with sqeezing=true works when Optim is loaded
  • Verify BoxWedgeTail with sqeezing=false works without Optim
  • Verify helpful error message appears when using sqeezing=true without Optim

🤖 Generated with Claude Code

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]>
@ChrisRackauckas-Claude
Copy link
Contributor Author

Added commit to skip Optim in Downgrade CI. See #245 for tracking the downgrade CI behavior with extensions.

Copy link
Member

@devmotion devmotion left a 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.

@ChrisRackauckas
Copy link
Member

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]>
@ChrisRackauckas-Claude
Copy link
Contributor Author

Updates in latest push:

Note: Documentation build failures are pre-existing issues unrelated to this PR - see #246 for tracking.

ChrisRackauckas and others added 2 commits January 11, 2026 16:02
- 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]>
@ChrisRackauckas
Copy link
Member

Good place to checkpoint this and finish the doc fixes in a new PR.

@ChrisRackauckas ChrisRackauckas merged commit 1b4ff0c into SciML:master Jan 11, 2026
12 of 13 checks passed
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 this pull request may close these issues.

4 participants