|
1 | | -using ADTypes |
2 | | -using Aqua: Aqua |
3 | | -using JET: JET |
4 | | -using Test |
| 1 | +using SciMLTesting, ADTypes, Test |
| 2 | +using JET |
5 | 3 |
|
6 | | -@testset "Aqua.jl" begin |
7 | | - Aqua.test_all(ADTypes; deps_compat = (check_extras = false,)) |
8 | | -end |
9 | | - |
10 | | -@testset "JET.jl" begin |
11 | | - JET.test_package(ADTypes, target_defined_modules = true) |
12 | | -end |
| 4 | +# Aqua and ExplicitImports are SciMLTesting deps, so they are not imported here. |
| 5 | +# Aqua is still listed in this env's `[deps]` (not ExplicitImports): Aqua's ambiguity |
| 6 | +# check spawns a worker subprocess that runs a bare `using Aqua` against the active |
| 7 | +# project, which only resolves if Aqua is a *direct* dep — a transitive (manifest-only) |
| 8 | +# Aqua makes that worker error with "Package Aqua not found in current path". |
| 9 | +run_qa( |
| 10 | + ADTypes; |
| 11 | + aqua_kwargs = (; deps_compat = (; check_extras = false)), |
| 12 | + jet_kwargs = (; target_defined_modules = true), |
| 13 | + explicit_imports = true, |
| 14 | + # Two unavoidable non-public `Base` names, ignored only in the public-API access |
| 15 | + # check (every other ExplicitImports check passes unignored): |
| 16 | + # * `broadcastable` — the documented broadcasting customization hook; |
| 17 | + # `Base.broadcastable(ad::AbstractADType) = Ref(ad)` makes AD choices broadcast |
| 18 | + # as scalars. `Base` marks it non-public on every Julia version. |
| 19 | + # * `depwarn` — `Base.depwarn` is the only way to emit a deprecation warning, and |
| 20 | + # it is non-public on the LTS (1.10). It became public in Base on 1.11+, where |
| 21 | + # ignoring it is a harmless no-op. |
| 22 | + # (`Base.Meta.isexpr` in src/compat.jl was switched off `Base.isexpr` so its access |
| 23 | + # resolves to the public `Base.Meta` owner and needs no ignore on any version.) |
| 24 | + ei_kwargs = (; all_qualified_accesses_are_public = (; ignore = (:broadcastable, :depwarn))), |
| 25 | +) |
0 commit comments