From 4faaf123c6f61c1dce8b342a5fb49b3eadda668e Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Wed, 24 Jun 2026 11:49:00 -0400 Subject: [PATCH 1/2] Add ExplicitImports.jl checks to QA via SciMLTesting run_qa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wire all six ExplicitImports.jl checks (no_implicit_imports, no_stale_explicit_imports, all_explicit_imports_via_owners, all_qualified_accesses_via_owners, all_qualified_accesses_are_public, all_explicit_imports_are_public) into the QA group through SciMLTesting's `run_qa(...; ExplicitImports = ExplicitImports, explicit_imports = true, ei_kwargs = ...)`. The four standard checks and `no_implicit_imports` pass with no configuration. The two public-API checks flag two internal `Core` accesses inherent to `hasbranching` (a compiler-introspection utility): `Core.GotoIfNot` (the IR node it scans for) and `Core.Typeof` (used to build the dispatch signature tuple for `code_typed`). Neither has a public equivalent — `typeof` differs from `Core.Typeof` on type-valued arguments and `Base.typesof` is itself non-public — so they are added to a minimal, documented per-check ignore-list rather than rewritten. Also fold Aqua and JET into the same `run_qa` call and drop the two stale `@test_broken false` placeholders (issues from #54): Aqua now passes with deps_compat enabled (root Project.toml carries compat for all test extras) and JET typo-mode passes (Cassette was replaced with `code_typed` in #55), so those placeholders would now error as unexpected passes. Test deps: add ExplicitImports (compat 1.15) to test/qa/Project.toml and bump SciMLTesting floor to 1.4 (run_qa ExplicitImports support). Verified locally on Julia 1.12 (`GROUP=QA Pkg.test`): QA group 18/18 pass, all six ExplicitImports checks green. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 2 +- test/qa/Project.toml | 4 +++- test/qa/qa.jl | 29 ++++++++++++++++------------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Project.toml b/Project.toml index 05a7ce8..2cee35b 100644 --- a/Project.toml +++ b/Project.toml @@ -9,7 +9,7 @@ authors = ["SciML"] ComponentArrays = "0.15" Random = "1.10" SafeTestsets = "0.1" -SciMLTesting = "1" +SciMLTesting = "1.4" Test = "1.10" julia = "1.10" diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 36fbb64..1a792c1 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -1,5 +1,6 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" FunctionProperties = "f62d2435-5019-4c03-9749-2d4c77af0cbc" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" @@ -11,8 +12,9 @@ FunctionProperties = {path = "../.."} [compat] Aqua = "0.8" +ExplicitImports = "1.15" JET = "0.9,0.10,0.11" SafeTestsets = "0.0.1, 0.1" -SciMLTesting = "1" +SciMLTesting = "1.4" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 7cdacc5..c3ddd93 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,14 +1,17 @@ -using FunctionProperties, Aqua, JET, Test +using FunctionProperties, Aqua, JET, ExplicitImports, SciMLTesting -@testset "Aqua" begin - # deps_compat disabled: missing [compat] for the Pkg test extra. - # Tracked in https://github.com/SciML/FunctionProperties.jl/issues/54 - Aqua.test_all(FunctionProperties; deps_compat = false) - @test_broken false # Aqua deps_compat: missing compat for Pkg extra — tracked in https://github.com/SciML/FunctionProperties.jl/issues/54 -end - -@testset "JET" begin - # JET finds `Cassette.m is not defined` in overdub(::typeof(nameof), ...). - # Tracked in https://github.com/SciML/FunctionProperties.jl/issues/54 - @test_broken false # JET: Cassette.m is not defined in overdub(::typeof(nameof), ...) — tracked in https://github.com/SciML/FunctionProperties.jl/issues/54 -end +# `hasbranching` is a compiler-introspection utility: it `code_typed`s `f` and scans the +# resulting IR for `Core.GotoIfNot` nodes, and builds the dispatch signature with +# `Core.Typeof`. Both names are internal to `Core` with no public equivalent +# (`typeof` differs from `Core.Typeof` on type-valued arguments, and `Base.typesof` +# is itself non-public), so these two accesses are ignored in the public-API checks. +run_qa( + FunctionProperties; + Aqua = Aqua, + JET = JET, jet = true, + ExplicitImports = ExplicitImports, explicit_imports = true, + ei_kwargs = (; + all_explicit_imports_are_public = (; ignore = (:GotoIfNot,)), + all_qualified_accesses_are_public = (; ignore = (:Typeof,)), + ) +) From bce48cb922d6a59f1c5dcdf8389a0d5bb5da73b8 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Wed, 24 Jun 2026 21:31:32 -0400 Subject: [PATCH 2/2] Convert QA to SciMLTesting 1.5 run_qa minimal form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SciMLTesting 1.5.0 makes Aqua and ExplicitImports its own direct deps and auto-detects them in run_qa, so the per-repo qa.jl no longer threads those modules. Collapse the call to its genuine per-repo content: - qa.jl imports: `using SciMLTesting, FunctionProperties, JET, Test` (drop `using Aqua, ExplicitImports` — now SciMLTesting deps; JET stays since its weakdep extension must be loaded to enable the JET check). - run_qa: keep `explicit_imports = true` (opt-in; defaults false in 1.5) and the per-check `ei_kwargs` ignore-lists for the two `Core` accesses inherent to `hasbranching`. Drop the now-auto-detected `Aqua = Aqua`, `JET = JET, jet = true`, and `ExplicitImports = ExplicitImports`. - test/qa/Project.toml: drop ExplicitImports (now transitive via SciMLTesting); bump SciMLTesting floor to 1.5. Root Project.toml SciMLTesting compat bumped to 1.5 as well. Aqua is intentionally KEPT as a direct dep of test/qa/Project.toml even though it is now also transitive: Aqua's `Method ambiguity` check spawns a fresh subprocess that does `using Aqua` against this env's active-project load path, where only direct deps resolve. Dropping it makes that one check error with "Package Aqua not found in current path" while every other Aqua check (run in-process via SciMLTesting's own Aqua) and the six ExplicitImports checks still pass — so Aqua must remain listed here. (A load-path fix for the ambiguity subprocess belongs upstream in SciMLTesting; until then the direct-dep entry is required.) Verified locally against the released SciMLTesting 1.5.0 (GROUP=QA Pkg.test): QA group 18/18 on both Julia 1.10 (lts) and 1.12 — Aqua 11/11 (incl. Method ambiguity), JET 1/1, ExplicitImports 6/6. Same checks/coverage as before. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 2 +- test/qa/Project.toml | 7 ++++--- test/qa/qa.jl | 6 ++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Project.toml b/Project.toml index 2cee35b..2a0f237 100644 --- a/Project.toml +++ b/Project.toml @@ -9,7 +9,7 @@ authors = ["SciML"] ComponentArrays = "0.15" Random = "1.10" SafeTestsets = "0.1" -SciMLTesting = "1.4" +SciMLTesting = "1.5" Test = "1.10" julia = "1.10" diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 1a792c1..87da6e5 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -1,6 +1,8 @@ +# Aqua is otherwise a transitive dep of SciMLTesting, but it is kept here as a +# direct dep because Aqua's `Method ambiguity` check spawns a fresh subprocess +# that `using Aqua` against this env's load path, where only direct deps resolve. [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" FunctionProperties = "f62d2435-5019-4c03-9749-2d4c77af0cbc" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" @@ -12,9 +14,8 @@ FunctionProperties = {path = "../.."} [compat] Aqua = "0.8" -ExplicitImports = "1.15" JET = "0.9,0.10,0.11" SafeTestsets = "0.0.1, 0.1" -SciMLTesting = "1.4" +SciMLTesting = "1.5" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index c3ddd93..f98a736 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,4 +1,4 @@ -using FunctionProperties, Aqua, JET, ExplicitImports, SciMLTesting +using SciMLTesting, FunctionProperties, JET, Test # `hasbranching` is a compiler-introspection utility: it `code_typed`s `f` and scans the # resulting IR for `Core.GotoIfNot` nodes, and builds the dispatch signature with @@ -7,9 +7,7 @@ using FunctionProperties, Aqua, JET, ExplicitImports, SciMLTesting # is itself non-public), so these two accesses are ignored in the public-API checks. run_qa( FunctionProperties; - Aqua = Aqua, - JET = JET, jet = true, - ExplicitImports = ExplicitImports, explicit_imports = true, + explicit_imports = true, ei_kwargs = (; all_explicit_imports_are_public = (; ignore = (:GotoIfNot,)), all_qualified_accesses_are_public = (; ignore = (:Typeof,)),