Skip to content

Add ExplicitImports.jl checks to QA via SciMLTesting run_qa#48

Merged
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:add-explicitimports-qa
Jun 27, 2026
Merged

Add ExplicitImports.jl checks to QA via SciMLTesting run_qa#48
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:add-explicitimports-qa

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

Adds ExplicitImports.jl testing to the QA test group through SciMLTesting's run_qa, alongside the existing Aqua and JET checks. All six ExplicitImports checks are enabled:

Standard checks

  • no_implicit_imports
  • no_stale_explicit_imports
  • all_explicit_imports_via_owners
  • all_qualified_accesses_via_owners

Public-API checks

  • all_qualified_accesses_are_public
  • all_explicit_imports_are_public

Result: all six pass with zero changes to package source

ConcreteStructs has no non-stdlib dependencies. Its source uses no using/import of external modules and references Base names only via fully-qualified, public accesses (Base.@__doc__, Base.show, Base.size, etc.). Consequently:

  • FIX: none needed — no implicit imports, no stale explicit imports, no non-public qualified accesses.
  • DECLARE-PUBLIC: none needed — the only public name is @concrete, already exported.
  • IGNORE-LIST: empty — no unavoidable non-public dep names.

Changes

  • test/qa/qa.jl: convert the hand-written Aqua.test_all / JET.test_package @testsets to the canonical run_qa(ConcreteStructs; Aqua=Aqua, JET=JET, jet=true, ExplicitImports=ExplicitImports, explicit_imports=true, ...). JET's deprecated target_defined_modules=true is replaced with the supported target_modules=(ConcreteStructs,).
  • test/qa/Project.toml: add ExplicitImports (compat 1.4) and bump SciMLTesting compat to 1.4 (the version whose run_qa supports ExplicitImports).

Local verification (Julia 1.12.6 and 1.10.11 / lts)

Full QA group via the CI path (Pkg.test() with GROUP=QA, Julia 1):

Test Summary: | Pass  Total   Time
QA/qa.jl      |   18     18  25.2s
     Testing ConcreteStructs tests passed

The six ExplicitImports checks individually (Julia 1.12.6):

Test Summary:                       | Pass  Total  Time
ExplicitImports (6 checks)          |    6      6  3.1s
  no_implicit_imports               |    1      1  0.5s
  no_stale_explicit_imports         |    1      1  0.8s
  all_explicit_imports_via_owners   |    1      1  0.4s
  all_qualified_accesses_via_owners |    1      1  0.6s
  all_qualified_accesses_are_public |    1      1  0.3s
  all_explicit_imports_are_public   |    1      1  0.4s

Same six pass on Julia 1.10.11 (lts). Runic check passes on test/qa/qa.jl.


This PR should be ignored until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

ChrisRackauckas and others added 2 commits June 24, 2026 11:48
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 test group through
SciMLTesting's run_qa, keeping the existing Aqua and JET checks.

ConcreteStructs has no non-stdlib dependencies and references Base names
only via fully-qualified, public accesses, so all six checks pass with no
fixes, no public-API declarations, and no ignore-list entries.

Also bump the QA env's SciMLTesting compat to 1.4 (run_qa's
ExplicitImports support) and add ExplicitImports = "1.4"; convert the
hand-written Aqua/JET @testsets to the canonical run_qa call and replace
JET's deprecated target_defined_modules with target_modules.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SciMLTesting 1.5.0 makes Aqua and ExplicitImports its own direct deps and
auto-detects them in run_qa (JET stays a weakdep, opt-in via `using JET`).
So the qa.jl call collapses to the per-repo essentials:

  - drop the `Aqua = Aqua`, `JET = JET`, `jet = true`, and
    `ExplicitImports = ExplicitImports` module-threading boilerplate
    (now auto-detected);
  - keep `explicit_imports = true` (opt-in, defaults false) and the genuine
    `jet_kwargs` target_modules override;
  - drop the `using Aqua` / `using ExplicitImports` lines (SciMLTesting
    provides them); keep `using JET` (this QA group runs JET).

QA env (test/qa/Project.toml): drop ExplicitImports (now transitive via
SciMLTesting), bump SciMLTesting compat to "1.5".

Keep Aqua as a direct dep of the QA env: Aqua's method-ambiguity check spawns
a clean worker subprocess that runs `using Aqua` (Base.load_path_setup_code +
`using Aqua`). A transitive-only Aqua is not resolvable by a top-level
`using` in that subprocess, so dropping it from [deps] fails the ambiguity
check with "Package Aqua not found in current path." Verified against released
SciMLTesting 1.5.0 on Julia 1.10: QA group passes 18/18 (Aqua 11 incl.
ambiguity + JET 1 + ExplicitImports 6); dropping Aqua from [deps] regresses
the ambiguity check to errored.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 27, 2026 12:57
@ChrisRackauckas ChrisRackauckas merged commit b45576d into SciML:main Jun 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants