From 0eb2ac4124b86b116fa87a4799e451f047400f68 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 23 Jul 2026 06:07:52 -0400 Subject: [PATCH] QA: ignore Compiler-owned BitVector/specialize_method in ExplicitImports checks PR #70 added `_CC.BitVector` and `_CC.specialize_method` accesses in src/hasbranching.jl (where `_CC` is the `Compiler` module). Under SciMLTesting 2.4 the ExplicitImports checks run by default, and these two names trip: - all_qualified_accesses_via_owners: both are owned by `Base` (per `Base.which` on 1.12) but reached through `Compiler`. - all_qualified_accesses_are_public: `BitVector` is not public in `Compiler`. Both must be reached via `Compiler` for version-portability: on Julia <= 1.11 the compiler bootstraps its own `BitVector` distinct from `Base.BitVector` (and `InferenceResult` accepts only that one), and `Base.specialize_method` does not exist on 1.10. Add them to the QA ignore lists with an explanatory comment. Verified locally: QA passes on Julia 1.12 (21/21) and 1.10 (19/19). Co-Authored-By: Chris Rackauckas --- test/qa/qa.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 82c63f0..d6b9be4 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -26,6 +26,12 @@ using SciMLTesting, FunctionProperties, JET, Test # method with constant argument types". This dependency is deliberately confined behind a # functional capability probe (`_const_prop_capable`) so the package degrades to the plain # type scan wherever these internals change shape. +# - `BitVector` marks which argtypes are `Core.Const`. It is reached through the `Compiler` +# module (not `Base`) because on Julia <= 1.11 the compiler bootstraps its own `BitVector` +# distinct from `Base.BitVector`, and `InferenceResult` accepts only that compiler-owned one. +# `specialize_method` is likewise only reachable via `Compiler` (`Base.specialize_method` +# does not exist on 1.10). On 1.12 `Base.which` reports `Base` as their owner, so both are +# also ignored in `all_qualified_accesses_via_owners`, not just the public-API check. # - `TwicePrecision` appears only in a constructor disambiguation that Aqua requires: Base # defines `(::Type{T<:Number})(::Base.TwicePrecision)`, which is ambiguous against the # degree tracer's generic constructor. @@ -35,9 +41,10 @@ run_qa( FunctionProperties; ei_kwargs = (; all_explicit_imports_are_public = (; ignore = (:GotoIfNot,)), + all_qualified_accesses_via_owners = (; ignore = (:BitVector, :specialize_method)), all_qualified_accesses_are_public = (; ignore = ( - :Typeof, :Argument, :CodeInfo, :Compiler, :Const, :GotoNode, + :Typeof, :Argument, :BitVector, :CodeInfo, :Compiler, :Const, :GotoNode, :InferenceResult, :InferenceState, :MethodInstance, :NativeInterpreter, :NewvarNode, :PartialStruct, :ReturnNode, :SSAValue, :SlotNumber, :TwicePrecision, :infer_effects, :is_consistent, :is_effect_free, :mightalias,