Skip to content

Commit a9af1a1

Browse files
committed
Require Julia v1.10+
1 parent 37c1d50 commit a9af1a1

File tree

6 files changed

+12
-23
lines changed

6 files changed

+12
-23
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
version:
20-
- '1.6'
20+
- 'lts'
2121
- '1'
2222
# - 'nightly'
2323
os:

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250"
1313
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1414
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1515
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
16-
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1716

1817
[weakdeps]
1918
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
@@ -33,7 +32,7 @@ NaNMath = "1"
3332
Preferences = "1"
3433
SpecialFunctions = "1, 2"
3534
StaticArrays = "1.5"
36-
julia = "1.6"
35+
julia = "1.10"
3736

3837
[extras]
3938
Calculus = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"

src/ForwardDiff.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ include("gradient.jl")
2222
include("jacobian.jl")
2323
include("hessian.jl")
2424

25-
if !isdefined(Base, :get_extension)
26-
include("../ext/ForwardDiffStaticArraysExt.jl")
27-
end
28-
2925
export DiffResults
3026

3127
end # module

src/dual.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,9 @@ Base.eps(::Type{D}) where {D<:Dual} = eps(valtype(D))
300300

301301
# The `base` keyword was added in Julia 1.8:
302302
# https://github.com/JuliaLang/julia/pull/42428
303-
if VERSION < v"1.8.0-DEV.725"
304-
Base.precision(d::Dual) = precision(value(d))
305-
Base.precision(::Type{D}) where {D<:Dual} = precision(valtype(D))
306-
else
307-
Base.precision(d::Dual; base::Integer=2) = precision(value(d); base=base)
308-
function Base.precision(::Type{D}; base::Integer=2) where {D<:Dual}
309-
precision(valtype(D); base=base)
310-
end
303+
Base.precision(d::Dual; base::Integer=2) = precision(value(d); base=base)
304+
function Base.precision(::Type{D}; base::Integer=2) where {D<:Dual}
305+
precision(valtype(D); base=base)
311306
end
312307

313308
function Base.nextfloat(d::ForwardDiff.Dual{T,V,N}) where {T,V,N}

test/AllocationsTest.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ convert_test_574() = convert(ForwardDiff.Dual{Nothing,ForwardDiff.Dual{Nothing,F
2424
index = 1
2525
alloc = @allocated ForwardDiff.seed!(duals, x, index, seeds)
2626
alloc = @allocated ForwardDiff.seed!(duals, x, index, seeds)
27-
if VERSION < v"1.9" || VERSION >= v"1.11"
27+
if VERSION >= v"1.11"
2828
@test alloc == 0
2929
else
3030
@test_broken alloc == 0
@@ -33,7 +33,7 @@ convert_test_574() = convert(ForwardDiff.Dual{Nothing,ForwardDiff.Dual{Nothing,F
3333
index = 1
3434
alloc = @allocated ForwardDiff.seed!(duals, x, index, seed)
3535
alloc = @allocated ForwardDiff.seed!(duals, x, index, seed)
36-
if VERSION < v"1.9" || VERSION >= v"1.11"
36+
if VERSION >= v"1.11"
3737
@test alloc == 0
3838
else
3939
@test_broken alloc == 0

test/DualTest.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,11 @@ ForwardDiff.:≺(::Type{OuterTestTag}, ::Type{TestTag}) = false
118118
@test precision(typeof(FDNUM)) === precision(V)
119119
@test precision(NESTED_FDNUM) === precision(PRIMAL)
120120
@test precision(typeof(NESTED_FDNUM)) === precision(V)
121-
if VERSION >= v"1.8.0-DEV.725" # https://github.com/JuliaLang/julia/pull/42428
122-
@test precision(FDNUM; base=10) === precision(PRIMAL; base=10)
123-
@test precision(typeof(FDNUM); base=10) === precision(V; base=10)
124-
@test precision(NESTED_FDNUM; base=10) === precision(PRIMAL; base=10)
125-
@test precision(typeof(NESTED_FDNUM); base=10) === precision(V; base=10)
126-
end
121+
122+
@test precision(FDNUM; base=10) === precision(PRIMAL; base=10)
123+
@test precision(typeof(FDNUM); base=10) === precision(V; base=10)
124+
@test precision(NESTED_FDNUM; base=10) === precision(PRIMAL; base=10)
125+
@test precision(typeof(NESTED_FDNUM); base=10) === precision(V; base=10)
127126

128127
@test floor(Int, FDNUM) === floor(Int, PRIMAL)
129128
@test floor(Int, FDNUM2) === floor(Int, PRIMAL2)

0 commit comments

Comments
 (0)