Skip to content

Commit 6db9608

Browse files
Merge pull request #161 from ChrisRackauckas-Claude/explicit-imports-qa
Add ExplicitImports.jl checks to QA via SciMLTesting run_qa
2 parents 6cbd3d8 + f99a4a4 commit 6db9608

5 files changed

Lines changed: 28 additions & 16 deletions

File tree

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ADTypes"
22
uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
33
authors = ["Vaibhav Dixit <vaibhavyashdixit@gmail.com>, Guillaume Dalle and contributors"]
4-
version = "1.22.1"
4+
version = "1.22.2"
55

66
[weakdeps]
77
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
@@ -18,7 +18,7 @@ ChainRulesCore = "1.0.2"
1818
ConstructionBase = "1.5"
1919
EnzymeCore = "0.5.3,0.6,0.7,0.8"
2020
SafeTestsets = "0.1, 1"
21-
SciMLTesting = "1"
21+
SciMLTesting = "1.5"
2222
julia = "1.10"
2323

2424
[extras]

ext/ADTypesChainRulesCoreExt.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module ADTypesChainRulesCoreExt
22

33
using ADTypes: ADTypes, AutoChainRules
44
using ChainRulesCore: HasForwardsMode, HasReverseMode,
5-
NoForwardsMode, NoReverseMode,
65
RuleConfig
76

87
# see https://juliadiff.org/ChainRulesCore.jl/stable/rule_author/superpowers/ruleconfig.html

src/compat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
macro public(ex)
44
return if VERSION >= v"1.11.0-DEV.469"
55
args = ex isa Symbol ? (ex,) :
6-
Base.isexpr(ex, :tuple) ? ex.args : error("Failed to mark $ex as public")
6+
Base.Meta.isexpr(ex, :tuple) ? ex.args : error("Failed to mark $ex as public")
77
esc(Expr(:public, args...))
88
else
99
nothing

test/qa/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ ADTypes = "1"
1414
Aqua = "0.8"
1515
JET = "0.9, 0.10, 0.11"
1616
SafeTestsets = "0.1, 1"
17-
SciMLTesting = "1"
17+
SciMLTesting = "1.5"
1818
Test = "1"
1919
julia = "1.10"

test/qa/qa.jl

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
using ADTypes
2-
using Aqua: Aqua
3-
using JET: JET
4-
using Test
1+
using SciMLTesting, ADTypes, Test
2+
using JET
53

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

Comments
 (0)