Skip to content

Commit ec14c61

Browse files
QA: scan the PrettyTables extension with ExplicitImports (#173)
* Make QA scan the PrettyTables extension ExplicitImports only adds an extension module to its checked set when `Base.get_extension` returns it, which requires the trigger package to be loaded. The QA environment loaded no weakdeps, so `SymbolicIndexingInterfacePrettyTablesExt` was never scanned. Add PrettyTables to `test/qa/Project.toml` and `using` it in `test/qa/qa.jl`. The newly-scanned extension reported implicit imports of `PrettyTables` and `pretty_table`, fixed at the source with an explicit `using ... :` list rather than an ignore entry. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> * Assert the extension actually loaded in QA `Base.get_extension` returning `nothing` makes ExplicitImports skip the extension silently, so a broken extension would leave QA green while dropping extension coverage back to zero. Check the module exists before `run_qa`. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
1 parent affcfdd commit ec14c61

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

ext/SymbolicIndexingInterfacePrettyTablesExt/SymbolicIndexingInterfacePrettyTablesExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module SymbolicIndexingInterfacePrettyTablesExt
33
using SymbolicIndexingInterface
44
using SymbolicIndexingInterface: ParameterIndexingProxy, parameter_symbols, symbolic_type,
55
ArraySymbolic, getp
6-
using PrettyTables
6+
using PrettyTables: PrettyTables, pretty_table
77

88
# Override the fallback implementation with the PrettyTables version
99
function SymbolicIndexingInterface.show_params(

test/qa/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
4+
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
45
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
56
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
67
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
@@ -9,6 +10,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
910
[compat]
1011
Aqua = "0.8"
1112
JET = "0.9, 0.10, 0.11"
13+
PrettyTables = "3"
1214
SafeTestsets = "0.0.1, 0.1"
1315
SciMLTesting = "2.1"
1416
Test = "1"

test/qa/qa.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ using SymbolicIndexingInterface
22
using SciMLTesting
33
using Test
44

5+
# ExplicitImports only sees an extension module once its trigger package is loaded, so
6+
# load every weakdep here to bring the extensions into the QA scan.
7+
using PrettyTables
8+
9+
# ExplicitImports silently skips an extension that fails to load, so assert the
10+
# extension modules actually exist rather than trusting a green run_qa.
11+
@testset "Extensions loaded" begin
12+
@test Base.get_extension(SymbolicIndexingInterface, :SymbolicIndexingInterfacePrettyTablesExt) !== nothing
13+
end
14+
515
# ExplicitImports per-check ignore-lists: each entry is a dependency name that is
616
# genuinely required but is neither exported nor declared `public` by its owner
717
# package, and has no public alternative to switch to.

0 commit comments

Comments
 (0)