Skip to content

Commit c362bbc

Browse files
Fix stale imports check for SciMLLogging macro-generated code
The @verbosity_specifier macro generates code that uses these imports, but ExplicitImports can't detect usage through macro expansions. Added them to the ignore list in the QA tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 14a6aa7 commit c362bbc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/qa.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ end
2727

2828
@test check_no_implicit_imports(LinearSolve; skip = (Base, Core),
2929
allow_unanalyzable = unanalyzable_mods) === nothing
30-
@test check_no_stale_explicit_imports(
31-
LinearSolve; allow_unanalyzable = unanalyzable_mods) === nothing
30+
# These SciMLLogging imports are used by the @verbosity_specifier macro-generated code
31+
# but ExplicitImports can't detect usage through macro expansions
32+
sciml_logging_macro_imports = (
33+
:AbstractVerbositySpecifier, :AbstractMessageLevel, :AbstractVerbosityPreset,
34+
:None, :Minimal, :Standard, :Detailed, :All
35+
)
36+
@test check_no_stale_explicit_imports(LinearSolve;
37+
allow_unanalyzable = unanalyzable_mods,
38+
ignore = sciml_logging_macro_imports) === nothing
3239
@test check_all_qualified_accesses_via_owners(LinearSolve) === nothing
3340
end

0 commit comments

Comments
 (0)