Skip to content

Fix minimum extension dependency compatibility - #508

Merged
ChrisRackauckas merged 1 commit into
JuliaArrays:masterfrom
ChrisRackauckas-Claude:codex/fix-minimum-extension-compat
Sep 4, 2026
Merged

Fix minimum extension dependency compatibility#508
ChrisRackauckas merged 1 commit into
JuliaArrays:masterfrom
ChrisRackauckas-Claude:codex/fix-minimum-extension-compat

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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

What changed and why

ArrayInterface's ChainRules extension imports OneElement, but the declared ChainRules = "1" bound allowed ChainRules 1.35.0, before that type existed. The Core tests also construct a positional ComponentVector(::NamedTuple) without declaring any ComponentArrays compat, so the downgrade resolver selected ComponentArrays 0.1.0, before that name existed.

Set the ChainRules API floor to 1.51, the first release defining OneElement, and allow ComponentArrays 0.x releases starting at 0.4.1, the first release supporting the exact constructor used by the test. No dependency was added or default changed, so this has no dependency-license impact.

Failing before

On clean master (97b9fe8), I ran the same downgrade implementation and locked Core test as CI:

TMPDIR=/home/crackauc/tmp /home/crackauc/.juliaup/bin/julia +1.10.12 --color=no downgrade.jl 'Pkg,TOML' '.' 'alldeps' '1' ''
TMPDIR=/home/crackauc/tmp GROUP=Core /home/crackauc/.juliaup/bin/julia +1.10.12 --project=. --color=no -e 'using Pkg; Pkg.test(coverage=false; allow_reresolve=false)'

ChainRules v1.35.0
ComponentArrays v0.1.0
ERROR: LoadError: UndefVarError: `OneElement` not defined
UndefVarError: `ComponentVector` not defined
Core | 220 passed, 1 errored, 221 total
ERROR: Some tests did not pass: 220 passed, 0 failed, 1 errored, 0 broken.

This reproduces the failures from the prior merged PR and the current PR507 downgrade jobs.

Passing after

The same locked downgrade commands resolve ComponentArrays 0.4.1 and the jointly compatible ChainRules 1.72.0, then pass:

BandedMatrices       |  21 / 21
BlockBandedMatrices  |   8 / 8
Core                 | 221 / 221
AD Integration       |  39 / 39
StaticArrays         |  39 / 39
ChainRules            |  20 / 20
FillArrays            |   7 / 7
Testing ArrayInterface tests passed

I separately probed the version boundaries on Julia 1.10.12:

ChainRules 1.50.0: ONEELEMENT=false
ChainRules 1.51.0: ONEELEMENT=true
ComponentArrays 0.4.0: MethodError for ComponentVector(::NamedTuple)
ComponentArrays 0.4.1: COMPONENTARRAYS=0.4.1 LENGTH=6

I also loaded the current ArrayInterface source from an environment pinned to the exact
ChainRules floor and asserted that the extension loads and both can_setindex methods
dispatch correctly:

TMPDIR=/home/crackauc/tmp /home/crackauc/.juliaup/bin/julia +1.10.12 --startup-file=no --project=.validation/probe-cr-151 --color=no -e 'using ChainRules, GPUArraysCore; pushfirst!(LOAD_PATH, pwd()); using ArrayInterface; x=ChainRules.OneElement(3.0,(3,3),(1:4,1:4)); @assert Base.get_extension(ArrayInterface,:ArrayInterfaceChainRulesExt)!==nothing; @assert !ArrayInterface.can_setindex(x); @assert !ArrayInterface.can_setindex(typeof(x)); println("EXACT_CHAINRULES_EXTENSION_PASS ArrayInterface=",pkgversion(ArrayInterface)," ChainRules=",pkgversion(ChainRules)," GPUArraysCore=",pkgversion(GPUArraysCore))'

EXACT_CHAINRULES_EXTENSION_PASS ArrayInterface=7.30.1 ChainRules=1.51.0 GPUArraysCore=0.1.5

ChainRules 1.51 cannot coexist with ArrayInterface's hard Adapt = "4" constraint; ChainRules first supports Adapt 4 in 1.60. The minimum installable graph was therefore exercised directly by checking the ChainRules extension dispatches, constructing the ComponentArrays 0.4.1 positional ComponentVector, and running the exact Core has_trivial_array_constructor(typeof(cv), rand(6)) path:

MINIMUM_GRAPH_PASS ArrayInterface=7.30.1 ChainRules=1.60.0 ComponentArrays=0.4.1 GPUArraysCore=0.1.6 Adapt=4.7.0

Current-dependency Core tests also pass on both supported runtimes:

TMPDIR=/home/crackauc/tmp GROUP=Core /home/crackauc/.juliaup/bin/julia +1.10.12 --project=. --color=no -e 'using Pkg; Pkg.test()'
TMPDIR=/home/crackauc/tmp GROUP=Core /home/crackauc/.juliaup/bin/julia +1.12.7 --project=. --color=no -e 'using Pkg; Pkg.test()'

# Each run:
BandedMatrices 21/21; BlockBandedMatrices 8/8; Core 221/221;
AD Integration 39/39; StaticArrays 39/39; ChainRules 20/20; FillArrays 7/7.

Additional checks:

git diff --name-only --diff-filter=ACM | typos --file-list - --format brief
git diff --check
/home/crackauc/.juliaup/bin/julia +1.12.7 --startup-file=no --project=. -e 'using TOML; p=TOML.parsefile("Project.toml"); @assert p["compat"]["ChainRules"] == "1.51"; @assert p["compat"]["ComponentArrays"] == "0.4.1 - 0"; println("PROJECT_COMPAT_PARSE_PASS")'

PROJECT_COMPAT_PARSE_PASS

No formatter applies to this Project.toml-only diff.

QA and unverified paths

This repository declares no GROUP=QA and has no QA workflow. An optional manual Aqua.test_all(ArrayInterface) run is not green on the unchanged baseline conditions: Aqua reports Adapt as stale because it is used only by GPU extension files, and reports eight longstanding test extras without compat (Aqua, JuliaFormatter, Pkg, Random, SafeTestsets, StaticArrays, SuiteSparse, and Test). ComponentArrays is no longer in that missing-compat list. Those unrelated repository-wide QA issues are deliberately not mixed into this focused fix.

I did not run GPU hardware tests or local macOS/Windows tests.

🤖 Generated with Codex CLI 0.151.0 (model: gpt-5.6-sol).
Session: local session ID 01a0598f-11b9-72d1-91d9-b2fbb186557d

Raise the ChainRules lower bound to the first release that defines OneElement and constrain ComponentArrays to versions providing the positional ComponentVector constructor used by the test suite.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.151.0
Agent-Model: gpt-5.6-sol
Agent-Session: local session ID 01a0598f-11b9-72d1-91d9-b2fbb186557d
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.35%. Comparing base (97b9fe8) to head (257beac).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #508   +/-   ##
=======================================
  Coverage   61.35%   61.35%           
=======================================
  Files          16       16           
  Lines         634      634           
=======================================
  Hits          389      389           
  Misses        245      245           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Terminal CI audit

CI reached a terminal state with 19 successful, 2 failed, 0 pending, 0 cancelled, and 0 skipped checks.

The checks specific to this compat fix are green:

The two downstream failures are not caused by this lower-bound-only Project.toml change:

  1. DiffEqBase.jl/Downstream/1 fails while precompiling ModelingToolkitBase because ObservedGraphCache constructs a BipartiteGraphs matching with an incompatible vertex type. The same failure is present on current master and on PR 507:

  2. SciMLSensitivity.jl/Core5/1 passes 41/42 assertions, but the unseeded Hybrid DE optimization finishes at loss 1.8940774f0 against a < 1.0 threshold. That test initializes Lux with Random.default_rng() without a seed, then runs a fixed 200 Adam iterations: https://github.com/SciML/SciMLSensitivity.jl/blob/master/test/Core5/hybrid_de.jl#L12-L63. The same job passed on PR 507 and on the latest master run:

The branch is current with upstream/master; no rebase is needed.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 4, 2026 21:25
@ChrisRackauckas
ChrisRackauckas merged commit 8f4fb2e into JuliaArrays:master Sep 4, 2026
19 of 21 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