Fix docs build: import OptimizationFunction and AutoForwardDiff explicitly - #1070
Merged
Merged
Conversation
…citly OptimizationIpopt v1.4 stopped re-exporting the Optimization API, so OptimizationFunction, OptimizationProblem, solve and AutoForwardDiff are no longer available from `using OptimizationIpopt` alone. Import them from the packages that define them, SciMLBase and ADTypes. Both are already dependencies of OptimizationIpopt, so no new package is loaded. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
baggepinnen
force-pushed
the
docs/fix-optimization-imports
branch
from
September 8, 2026 05:21
118aa9f to
0d5b3be
Compare
|
This is an automated message.
|
|
This is an automated message.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1070 +/- ##
==========================================
+ Coverage 87.94% 91.63% +3.68%
==========================================
Files 42 42
Lines 5649 5714 +65
==========================================
+ Hits 4968 5236 +268
+ Misses 681 478 -203 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.












The Documentation workflow has been failing on master since July 31 and on open PRs since.
Cause
The current failure is in
docs/src/examples/automatic_differentiation.md:OptimizationIpopt v1.4 (SciML/Optimization.jl#1286, merged 2026-08-02) curated its public API and no longer re-exports the Optimization API. The example only did
using OptimizationIpopt, soOptimizationFunction,OptimizationProblem,solveandOptimizationIpopt.AutoForwardDiffare no longer available.The earlier July failure on master was a different, transient issue: DelayDiffEq v6.1.0 resolved together with an incompatible OrdinaryDiffEqCore v4.11.0, making every
lsimon a delay system throw. Newer registry versions resolve compatibly now, and those pages pass in today's CI runs and locally.Fix
Import the missing names from the packages that define them, without loading Optimization.jl:
using SciMLBase: OptimizationFunction, OptimizationProblem, solveusing ADTypes: AutoForwardDiffBoth packages are already dependencies of OptimizationIpopt, so this adds nothing to the load time. They are added to
docs/Project.tomlso they can be loaded directly.Verification
Instantiated the docs environment the same way the workflow does (resolves to OptimizationIpopt v1.4.1, SciMLBase v3.53.1, ADTypes v1.24.0) and ran every
@exampleblock ofautomatic_differentiation.md,delay_systems.md,smith_predictor.mdandzoh.mdin order. All pass.🤖 Generated with Claude Code