Skip to content

Commit 29388ff

Browse files
Import CommonSolve interface functions directly from CommonSolve
Changes: - Add CommonSolve as a direct dependency in Project.toml - Import init, solve, solve! directly from CommonSolve instead of SciMLBase - Keep __init and __solve imported from SciMLBase (internal hooks) - Remove unnecessary comment about DiffEqBase This makes the dependency on CommonSolve explicit and clarifies that the solve interface comes from CommonSolve.jl. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 51bd57a commit 29388ff

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/OptimizationBase/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ version = "3.0.0"
66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
88
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
9+
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
910
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
1011
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1112
FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
@@ -42,6 +43,7 @@ OptimizationZygoteExt = "Zygote"
4243
[compat]
4344
ADTypes = "1.9"
4445
ArrayInterface = "7.6"
46+
CommonSolve = "0.2"
4547
DifferentiationInterface = "0.7"
4648
DocStringExtensions = "0.9"
4749
Enzyme = "0.13.2"

lib/OptimizationBase/src/OptimizationBase.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ using Reexport
55
@reexport using SciMLBase, ADTypes
66

77
using ArrayInterface, Base.Iterators, SparseArrays, LinearAlgebra
8+
import CommonSolve: init, solve, solve!
89
import SciMLBase: OptimizationProblem,
910
OptimizationFunction, ObjSense,
1011
MaxSense, MinSense, OptimizationStats,
@@ -13,7 +14,7 @@ import SciMLBase: OptimizationProblem,
1314
allowscallback, requiresgradient,
1415
requireshessian, requiresconsjac,
1516
requiresconshess, supports_opt_cache_interface,
16-
__init, __solve, init, solve, solve!
17+
__init, __solve
1718
export ObjSense, MaxSense, MinSense
1819
export allowsbounds, requiresbounds, allowsconstraints, requiresconstraints,
1920
allowscallback, requiresgradient, requireshessian,

lib/OptimizationBase/src/solve.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Skip the DiffEqBase handling
2-
31
struct IncompatibleOptimizerError <: Exception
42
err::String
53
end

0 commit comments

Comments
 (0)