Skip to content

Commit 90aacf2

Browse files
Merge pull request #1177 from SciML/remove-get-extension-compat
Remove Julia v1.9 get_extension compatibility code
2 parents 8223e3e + 92bb0ff commit 90aacf2

7 files changed

+20
-59
lines changed

ext/DiffEqBaseGTPSAExt.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
module DiffEqBaseGTPSAExt
22

3-
if isdefined(Base, :get_extension)
4-
using DiffEqBase
5-
import DiffEqBase: value, ODE_DEFAULT_NORM
6-
using GTPSA
7-
else
8-
using ..DiffEqBase
9-
import ..DiffEqBase: value, ODE_DEFAULT_NORM
10-
using ..GTPSA
11-
end
3+
using DiffEqBase
4+
import DiffEqBase: value, ODE_DEFAULT_NORM
5+
using GTPSA
126

137
value(x::TPS) = scalar(x)
148
value(::Type{<:TPS{T}}) where {T} = T

ext/DiffEqBaseGeneralizedGeneratedExt.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
module DiffEqBaseGeneralizedGeneratedExt
22

3-
if isdefined(Base, :get_extension)
4-
using DiffEqBase
5-
using GeneralizedGenerated
6-
else
7-
using ..DiffEqBase
8-
using ..GeneralizedGenerated
9-
end
3+
using DiffEqBase
4+
using GeneralizedGenerated
105

116
function SciMLBase.numargs(::GeneralizedGenerated.RuntimeFn{Args}) where {Args}
127
GeneralizedGenerated.from_type(Args) |> length

ext/DiffEqBaseMPIExt.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
module DiffEqBaseMPIExt
22

3-
if isdefined(Base, :get_extension)
4-
using DiffEqBase
5-
import MPI
6-
else
7-
using ..DiffEqBase
8-
import ..MPI
9-
end
3+
using DiffEqBase
4+
import MPI
105

116
if isdefined(MPI, :AbstractMultiRequest)
127
function DiffEqBase.anyeltypedual(::Type{T},

ext/DiffEqBaseMeasurementsExt.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
module DiffEqBaseMeasurementsExt
22

3-
if isdefined(Base, :get_extension)
4-
using DiffEqBase
5-
import DiffEqBase: value
6-
using Measurements
7-
else
8-
using ..DiffEqBase
9-
import ..DiffEqBase: value
10-
using ..Measurements
11-
end
3+
using DiffEqBase
4+
import DiffEqBase: value
5+
using Measurements
126

137
function DiffEqBase.promote_u0(u0::AbstractArray{<:Measurements.Measurement},
148
p::AbstractArray{<:Measurements.Measurement}, t0)

ext/DiffEqBaseMonteCarloMeasurementsExt.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
module DiffEqBaseMonteCarloMeasurementsExt
22

3-
if isdefined(Base, :get_extension)
4-
using DiffEqBase
5-
import DiffEqBase: value
6-
using MonteCarloMeasurements
7-
else
8-
using ..DiffEqBase
9-
import ..DiffEqBase: value
10-
using ..MonteCarloMeasurements
11-
end
3+
using DiffEqBase
4+
import DiffEqBase: value
5+
using MonteCarloMeasurements
126

137
function DiffEqBase.promote_u0(
148
u0::AbstractArray{

ext/DiffEqBaseTrackerExt.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
module DiffEqBaseTrackerExt
22

3-
if isdefined(Base, :get_extension)
4-
using DiffEqBase
5-
import DiffEqBase: value
6-
import Tracker
7-
else
8-
using ..DiffEqBase
9-
import ..DiffEqBase: value
10-
import ..Tracker
11-
end
3+
using DiffEqBase
4+
import DiffEqBase: value
5+
import Tracker
126

137
DiffEqBase.value(x::Type{Tracker.TrackedReal{T}}) where {T} = T
148
DiffEqBase.value(x::Type{Tracker.TrackedArray{T, N, A}}) where {T, N, A} = Array{T, N}

ext/DiffEqBaseUnitfulExt.jl

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
module DiffEqBaseUnitfulExt
22

3-
if isdefined(Base, :get_extension)
4-
using DiffEqBase
5-
import DiffEqBase: value
6-
using Unitful
7-
else
8-
using ..DiffEqBase
9-
import ..DiffEqBase: value
10-
using ..Unitful
11-
end
3+
using DiffEqBase
4+
import DiffEqBase: value
5+
using Unitful
6+
127
# Support adaptive errors should be errorless for exponentiation
138
value(x::Type{Unitful.AbstractQuantity{T, D, U}}) where {T, D, U} = T
149
value(x::Unitful.AbstractQuantity) = x.val

0 commit comments

Comments
 (0)