diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c1e5841..391d16c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,12 +29,7 @@ jobs: os: - ubuntu-latest - windows-latest - include: - - os: macOS-latest - version: 'lts' - - os: macOS-latest - version: '1' - + - macOS-latest steps: - uses: actions/checkout@v5 - uses: julia-actions/setup-julia@v2 diff --git a/Project.toml b/Project.toml index e43900af..9eb2914c 100644 --- a/Project.toml +++ b/Project.toml @@ -13,7 +13,6 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" -StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [weakdeps] StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" @@ -33,7 +32,7 @@ NaNMath = "1" Preferences = "1" SpecialFunctions = "1, 2" StaticArrays = "1.5" -julia = "1.6" +julia = "1.10" [extras] Calculus = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" diff --git a/docs/src/user/advanced.md b/docs/src/user/advanced.md index 9e2ca8ee..4ac0150d 100644 --- a/docs/src/user/advanced.md +++ b/docs/src/user/advanced.md @@ -85,8 +85,8 @@ julia> @time ForwardDiff.gradient!(out, rosenbrock, x, cfg); ``` The underlying heuristic will compute a suitable chunk size smaller or equal -to the `ForwardDiff.DEFAULT_CHUNK_THRESHOLD` constant. As of ForwardDiff -v0.10.32 and Julia 1.6, this constant can be configured at load time via +to the `ForwardDiff.DEFAULT_CHUNK_THRESHOLD` constant. +This constant can be configured at load time via [Preferences.jl](https://github.com/JuliaPackaging/Preferences.jl) by setting the `default_chunk_threshold` value. diff --git a/src/ForwardDiff.jl b/src/ForwardDiff.jl index fdfcd560..b16b986b 100644 --- a/src/ForwardDiff.jl +++ b/src/ForwardDiff.jl @@ -22,10 +22,6 @@ include("gradient.jl") include("jacobian.jl") include("hessian.jl") -if !isdefined(Base, :get_extension) - include("../ext/ForwardDiffStaticArraysExt.jl") -end - export DiffResults end # module diff --git a/src/dual.jl b/src/dual.jl index 7e8ec110..179c48d3 100644 --- a/src/dual.jl +++ b/src/dual.jl @@ -300,14 +300,9 @@ Base.eps(::Type{D}) where {D<:Dual} = eps(valtype(D)) # The `base` keyword was added in Julia 1.8: # https://github.com/JuliaLang/julia/pull/42428 -if VERSION < v"1.8.0-DEV.725" - Base.precision(d::Dual) = precision(value(d)) - Base.precision(::Type{D}) where {D<:Dual} = precision(valtype(D)) -else - Base.precision(d::Dual; base::Integer=2) = precision(value(d); base=base) - function Base.precision(::Type{D}; base::Integer=2) where {D<:Dual} - precision(valtype(D); base=base) - end +Base.precision(d::Dual; base::Integer=2) = precision(value(d); base=base) +function Base.precision(::Type{D}; base::Integer=2) where {D<:Dual} + precision(valtype(D); base=base) end function Base.nextfloat(d::ForwardDiff.Dual{T,V,N}) where {T,V,N} diff --git a/test/DualTest.jl b/test/DualTest.jl index 6d0bf85f..bd50c37c 100644 --- a/test/DualTest.jl +++ b/test/DualTest.jl @@ -118,12 +118,11 @@ ForwardDiff.:≺(::Type{OuterTestTag}, ::Type{TestTag}) = false @test precision(typeof(FDNUM)) === precision(V) @test precision(NESTED_FDNUM) === precision(PRIMAL) @test precision(typeof(NESTED_FDNUM)) === precision(V) - if VERSION >= v"1.8.0-DEV.725" # https://github.com/JuliaLang/julia/pull/42428 - @test precision(FDNUM; base=10) === precision(PRIMAL; base=10) - @test precision(typeof(FDNUM); base=10) === precision(V; base=10) - @test precision(NESTED_FDNUM; base=10) === precision(PRIMAL; base=10) - @test precision(typeof(NESTED_FDNUM); base=10) === precision(V; base=10) - end + + @test precision(FDNUM; base=10) === precision(PRIMAL; base=10) + @test precision(typeof(FDNUM); base=10) === precision(V; base=10) + @test precision(NESTED_FDNUM; base=10) === precision(PRIMAL; base=10) + @test precision(typeof(NESTED_FDNUM); base=10) === precision(V; base=10) @test floor(Int, FDNUM) === floor(Int, PRIMAL) @test floor(Int, FDNUM2) === floor(Int, PRIMAL2)