Skip to content

Fix ModelingToolkitBase QA imports on Julia 1.11 - #5028

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/mtkbase-qa-imports
Aug 31, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/mtkbase-qa-imports

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Failing before

On clean upstream/master at 24e9206e21263ae41c43148434bd4c2dd1bf1977, Julia 1.11.9 failed the ModelingToolkitBase QA group:

GROUP=ModelingToolkitBase_QA ~/.juliaup/bin/julia +1.11 --project=lib/ModelingToolkitBase -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total     Time
JET Tests     |   54     54  3m39.9s

Test Summary:                                  | Pass  Error  Total     Time
Aqua Tests                                     |   19      2     21  5m06.8s
    ExplicitImports                            |    4      2      6    39.3s
      no_implicit_imports                      |           1      1     7.1s
      all_qualified_accesses_are_public        |           1      1     4.7s
ERROR: Package ModelingToolkitBase errored during testing

The two findings were the implicitly imported UnPack binding and Julia 1.11's missing public metadata for the documented Base.Iterators.filter, map, and reverse APIs.

Passing after

The same command passes with this PR:

Test Summary: | Pass  Total     Time
JET Tests     |   54     54  4m02.7s

Test Summary: | Pass  Total     Time
Aqua Tests    |   21     21  5m21.7s
571.292962 seconds (412.98 M allocations: 20.602 GiB, 3.46% gc time, 31.16% compilation time: 8% of which was recompilation)
     Testing ModelingToolkitBase tests passed

What changed

UnPack and @unpack are now explicitly imported while retaining the existing reexport. The three documented iterator APIs are recorded in the existing qualified-access compatibility list because Julia 1.11 does not declare them public; Julia 1.12 does.

This addresses the Julia 1.11 findings exposed by #4989 without changing the iterator implementations or runtime behavior.

Additional verification

~/.juliaup/bin/julia +1.11 --project=../.runic-env -e 'using Runic; exit(Runic.main(ARGS))' -- --check --diff lib/ModelingToolkitBase/src/ModelingToolkitBase.jl lib/ModelingToolkitBase/test/qa/aqua.jl
typos lib/ModelingToolkitBase/src/ModelingToolkitBase.jl lib/ModelingToolkitBase/test/qa/aqua.jl
git diff --check

All three commands exited successfully with no findings.

No documentation or public API changed, so the documentation build was not run. Test groups outside ModelingToolkitBase_QA were not run.

Ignore this PR until it has been reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Current-master revalidation after rebasing this PR onto 5509368:

Failing before, on unmodified current master with Julia 1.10.12 and a fresh writable depot:

GROUP=QA julia +1.10.12 --startup-file=no --check-bounds=yes --depwarn=yes \
  --project=lib/ModelingToolkitBase -e 'using Pkg; Pkg.test(; allow_reresolve=true)'
Test Summary: | Pass  Total     Time
JET Tests     |   54     54  9m40.8s

Test Summary: | Pass  Error  Total     Time
Aqua Tests    |   18      1     19  5m20.4s
  ExplicitImports
    no_implicit_imports: ImplicitImportsException
    * `UnPack` which is exported by `UnPack`

EXIT=1 WALL=929.57

Passing after, on rebased commit c38d014 with another fresh writable depot:

Test Summary: | Pass  Total     Time
JET Tests     |   54     54  9m34.7s

Test Summary: | Pass  Total     Time
Aqua Tests    |   19     19  9m19.0s
Testing ModelingToolkitBase tests passed

EXIT=0 WALL=1158.50

This is not a Symbolics, ExplicitImports, or UnPack release regression. A reduced test fails with both ExplicitImports 1.14.2/1.15.0 and UnPack 1.0.0/1.0.2 on Julia 1.10.12. On that Julia line, running import UnPack after @reexport using UnPack does not make the already-implicit module binding explicit to the analysis. Importing the module first, as this PR does, fixes it.

Julia 1.11.9 targeted verification also confirms the iterator compatibility entries remain necessary: removing only filter, map, and reverse produces exactly those three Base.Iterators non-public-access findings; the complete allowlist passes. The targeted command exited 0 in 26.57 seconds.

Runic 1.10.0, typos, and git diff --check all pass on the rebased two-file diff. The deterministic method-overwrite warnings remain independently tracked at #5052; no test was skipped or silenced here.

This evidence comment was written by an AI agent (Codex CLI 0.151.0, model unknown). Agent session: local session ID 01a04fa1-cfe0-7260-b416-72fe8a15d17d.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 31, 2026 22:01
@ChrisRackauckas
ChrisRackauckas merged commit e91f13e into SciML:master Aug 31, 2026
98 of 109 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 7, 2026
- qa: approve newly exported Symbolics API (#5050)
- Update redirected documentation links (#5054)
- qa: fix ModelingToolkitBase import checks (#5028)
- docs: replace stale Pantelides link (#5056)
- Precompile ODEProblem construction and DAE initialization in MTK workloads (#5061)
- Release 11.41.0 (#5069)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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