Skip to content

Commit 621c1b4

Browse files
committed
refactor: use reexports
1 parent 3ded2fa commit 621c1b4

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

docs/src/release_notes.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44

55
### Breaking Changes in `NonlinearSolve.jl` v4
66

7+
- See [common breaking changes](@ref common-breaking-changes-v4v2) below.
8+
79
### Breaking Changes in `SimpleNonlinearSolve.jl` v2
810

9-
- `Auto*` structs are no longer exported. Load `ADTypes` to access them.
11+
- See [common breaking changes](@ref common-breaking-changes-v4v2) below.
12+
13+
### [Common Breaking Changes](@id common-breaking-changes-v4v2)
14+
1015
- Use of termination conditions from `DiffEqBase` has been removed. Use the termination
1116
conditions from `NonlinearSolveBase` instead.
12-
- We no longer export the entire `SciMLBase`. Instead selected functionality relevant to
13-
`SimpleNonlinearSolve` has been exported.
1417
- If no autodiff is provided, we now choose from a list of autodiffs based on the packages
1518
loaded. For example, if `Enzyme` is loaded, we will default to that. In general, we
1619
don't guarantee the exact autodiff selected if `autodiff` is not provided (i.e.

lib/SimpleNonlinearSolve/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1919
MaybeInplace = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb"
2020
NonlinearSolveBase = "be0214bd-f91f-a760-ac4e-3421ce2b2da0"
2121
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
22+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
2223
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
2324
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
2425

@@ -60,6 +61,7 @@ Pkg = "1.10"
6061
PolyesterForwardDiff = "0.1"
6162
PrecompileTools = "1.2"
6263
Random = "1.10"
64+
Reexport = "1.2"
6365
ReverseDiff = "1.15"
6466
SciMLBase = "2.50"
6567
StaticArrays = "1.9"

lib/SimpleNonlinearSolve/src/SimpleNonlinearSolve.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ using LineSearch: LiFukushimaLineSearch
88
using LinearAlgebra: LinearAlgebra, dot
99
using MaybeInplace: @bb, setindex_trait, CannotSetindex, CanSetindex
1010
using PrecompileTools: @compile_workload, @setup_workload
11+
using Reexport: @reexport
1112
using SciMLBase: SciMLBase, AbstractNonlinearAlgorithm, NonlinearFunction, NonlinearProblem,
1213
NonlinearLeastSquaresProblem, IntervalNonlinearProblem, ReturnCode, remake
1314
using StaticArraysCore: StaticArray, SArray, SVector, MArray
@@ -18,7 +19,6 @@ using DifferentiationInterface: DifferentiationInterface
1819
using FiniteDiff: FiniteDiff
1920
using ForwardDiff: ForwardDiff
2021

21-
using BracketingNonlinearSolve: Alefeld, Bisection, Brent, Falsi, ITP, Ridder
2222
using NonlinearSolveBase: NonlinearSolveBase, ImmutableNonlinearProblem, L2_NORM,
2323
nonlinearsolve_forwarddiff_solve, nonlinearsolve_dual_solution
2424

@@ -138,11 +138,8 @@ function solve_adjoint_internal end
138138
end
139139
end
140140

141-
export IntervalNonlinearProblem
142-
143-
export Alefeld, Bisection, Brent, Falsi, ITP, Ridder
144-
145-
export NonlinearFunction, NonlinearProblem, NonlinearLeastSquaresProblem
141+
# Rexexports
142+
@reexport using ADTypes, SciMLBase, BracketingNonlinearSolve, NonlinearSolveBase
146143

147144
export SimpleBroyden, SimpleKlement, SimpleLimitedMemoryBroyden
148145
export SimpleDFSane

src/NonlinearSolve.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ using SparseArrays: AbstractSparseMatrix, SparseMatrixCSC
4848
using SparseMatrixColorings: ConstantColoringAlgorithm, GreedyColoringAlgorithm,
4949
LargestFirst
5050

51-
@reexport using SciMLBase, SimpleNonlinearSolve, NonlinearSolveBase
52-
5351
const DI = DifferentiationInterface
5452

5553
const True = Val(true)
@@ -157,6 +155,9 @@ include("default.jl")
157155
end
158156
end
159157

158+
# Rexexports
159+
@reexport using SciMLBase, SimpleNonlinearSolve, NonlinearSolveBase
160+
160161
# Core Algorithms
161162
export NewtonRaphson, PseudoTransient, Klement, Broyden, LimitedMemoryBroyden, DFSane
162163
export GaussNewton, LevenbergMarquardt, TrustRegion

0 commit comments

Comments
 (0)