From ae441f954fb5908e9063809f8e482a2c2446e971 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Wed, 22 Jul 2026 09:15:06 -0400 Subject: [PATCH] Migrate FindFirstFunctions QA to SciMLTesting 2.4 Co-Authored-By: Chris Rackauckas --- Project.toml | 2 +- src/equality.jl | 2 +- src/guesser.jl | 2 +- src/kinds.jl | 18 +++++++++--------- test/qa/Project.toml | 2 +- test/qa/qa.jl | 20 +++----------------- 6 files changed, 16 insertions(+), 30 deletions(-) diff --git a/Project.toml b/Project.toml index 812778d..a2d135b 100644 --- a/Project.toml +++ b/Project.toml @@ -10,7 +10,7 @@ PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" ForwardDiff = "0.10, 1" PrecompileTools = "1.0.1" SafeTestsets = "0.1" -SciMLTesting = "2.2" +SciMLTesting = "2.4" StableRNGs = "1" Test = "1.10" julia = "1.10" diff --git a/src/equality.jl b/src/equality.jl index a178a6a..9223d53 100644 --- a/src/equality.jl +++ b/src/equality.jl @@ -55,7 +55,7 @@ end function findfirstsortedequal( var::Int64, vars::DenseVector{Int64}, - ::Val{basecase} = Base.libllvm_version >= v"17" ? Val(8) : Val(128), + ::Val{basecase} = VERSION >= v"1.12" ? Val(8) : Val(128), ) where {basecase} len = length(vars) offset = 0 diff --git a/src/guesser.jl b/src/guesser.jl index 11c2342..d4617f0 100644 --- a/src/guesser.jl +++ b/src/guesser.jl @@ -30,7 +30,7 @@ next correlated lookup by either """ struct Guesser{T <: AbstractVector} v::T - idx_prev::Base.RefValue{Int} + idx_prev::typeof(Ref(1)) linear_lookup::Bool end diff --git a/src/kinds.jl b/src/kinds.jl index d9442df..bbcfe7a 100644 --- a/src/kinds.jl +++ b/src/kinds.jl @@ -51,21 +51,21 @@ end # Julia 1.10's `@enum` does not accept inline docstrings for individual # values, so keep per-kind docs immediately next to the enum definition. -@doc """ +""" KIND_BINARY_BRACKET::StrategyKind Select [`BinaryBracket`](@ref FindFirstFunctions.BinaryBracket), the plain binary-search fallback for positional sorted searches. """ KIND_BINARY_BRACKET -@doc """ +""" KIND_LINEAR_SCAN::StrategyKind Select [`LinearScan`](@ref FindFirstFunctions.LinearScan), the hinted strategy that walks linearly from a nearby index. """ KIND_LINEAR_SCAN -@doc """ +""" KIND_SIMD_LINEAR_SCAN::StrategyKind Select [`SIMDLinearScan`](@ref FindFirstFunctions.SIMDLinearScan), the @@ -73,7 +73,7 @@ hinted linear scan with SIMD-specialized forward walks for supported dense vectors. """ KIND_SIMD_LINEAR_SCAN -@doc """ +""" KIND_BRACKET_GALLOP::StrategyKind Select [`BracketGallop`](@ref FindFirstFunctions.BracketGallop), the hinted @@ -81,7 +81,7 @@ strategy that expands a bidirectional exponential bracket before binary searching inside it. """ KIND_BRACKET_GALLOP -@doc """ +""" KIND_EXP_FROM_LEFT::StrategyKind Select [`ExpFromLeft`](@ref FindFirstFunctions.ExpFromLeft), the hinted @@ -89,7 +89,7 @@ strategy that treats the hint as a left bound and searches forward exponentially. """ KIND_EXP_FROM_LEFT -@doc """ +""" KIND_INTERPOLATION_SEARCH::StrategyKind Select [`InterpolationSearch`](@ref FindFirstFunctions.InterpolationSearch), @@ -97,7 +97,7 @@ the strategy that guesses from linear extrapolation across the vector endpoints. """ KIND_INTERPOLATION_SEARCH -@doc """ +""" KIND_BIT_INTERPOLATION_SEARCH::StrategyKind Select @@ -105,14 +105,14 @@ Select the opt-in interpolation strategy that guesses from Float64 bit patterns. """ KIND_BIT_INTERPOLATION_SEARCH -@doc """ +""" KIND_UNIFORM_STEP::StrategyKind Select [`UniformStep`](@ref FindFirstFunctions.UniformStep), the direct arithmetic lookup strategy for uniformly-spaced vectors and ranges. """ KIND_UNIFORM_STEP -@doc """ +""" KIND_BISECT_THEN_SIMD::StrategyKind Select [`BisectThenSIMD`](@ref FindFirstFunctions.BisectThenSIMD), the diff --git a/test/qa/Project.toml b/test/qa/Project.toml index e5f6b54..071bbd0 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -13,5 +13,5 @@ Aqua = "0.8" FindFirstFunctions = "1, 2.1, 3" JET = "0.9, 0.10, 0.11" SafeTestsets = "0.0.1, 0.1" -SciMLTesting = "2.1" +SciMLTesting = "2.4" Test = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 3e47319..48adcf1 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -2,21 +2,7 @@ using SciMLTesting, FindFirstFunctions, JET, Test run_qa( FindFirstFunctions; - explicit_imports = true, - ei_kwargs = (; - # All six are Base internals accessed by qualification (GC.@preserve, - # Base.@propagate_inbounds, Base.Order, Base.RefValue, Base.libllvm_version, - # Base.llvmcall). They are not public API, so ExplicitImports flags the - # qualified accesses; there is no public replacement. Source pkg: Base. - all_qualified_accesses_are_public = (; - ignore = ( - Symbol("@preserve"), - Symbol("@propagate_inbounds"), - :Order, - :RefValue, - :libllvm_version, - :llvmcall, - ), - ), - ), + # Custom LLVM IR has no public Julia entry point; Base.llvmcall is the compiler + # intrinsic required by the package's SIMD kernels. + ei_kwargs = (; all_qualified_accesses_are_public = (; ignore = (:llvmcall,))), )