Remove ArrayInterfaceCore can_setindex type piracy (resolves #68)#70
Merged
ChrisRackauckas merged 2 commits intoJun 27, 2026
Conversation
The package defined `can_setindex` for `FillArrays.AbstractFill` and `Zygote.OneElement` on `ArrayInterfaceCore` (function owned by ArrayInterface, types owned by FillArrays/Zygote) — type piracy that Aqua only tolerated via `piracies = (; broken = true)`. These methods were also effectively dead: they target the deprecated `ArrayInterfaceCore.can_setindex`, while the current solver stack (LinearSolve/NonlinearSolve) dispatches on `ArrayInterface.can_setindex`. The `AbstractFill`/`OneElement` immutability is now provided upstream by ArrayInterface's FillArrays extension (JuliaArrays/ArrayInterface.jl#493), which loads automatically since FillArrays is already a dependency. `Zygote.OneElement` is no longer constructed by current Zygote (gradients route through `ChainRules.OneElement`, already covered upstream). Drops the unused `ArrayInterfaceCore` dependency and re-enables the Aqua piracy check. Resolves SciML#68. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #68.
Summary
Removes the type piracy in
src/ComplementaritySolve.jl:and re-enables the Aqua piracy check (drops
piracies = (; broken = true)).Why this is safe
ArrayInterfaceCore.can_setindex(the deprecated 0.1 package), but the current solver stack (LinearSolve/NonlinearSolve) dispatches onArrayInterface.can_setindex— a different function. Nothing in this package callscan_setindexitself;ArrayInterfaceCorewas imported solely to host these two definitions.AbstractFill/OneElementimmutability now lives upstream. Added in ArrayInterface via a FillArrays extension: Add FillArrays extension for can_setindex JuliaArrays/ArrayInterface.jl#493. It loads automatically here becauseFillArraysis already a dependency andArrayInterfaceis present transitively (via LinearSolve), so no new direct dependency is needed.Zygote.OneElementis no longer produced by Zygote. In current Zygote (0.7.x) the type is defined but never constructed;getindexgradients flow throughChainRules.OneElement, which ArrayInterface already covers (ArrayInterfaceChainRulesExt).The unused
ArrayInterfaceCoredependency (deps + compat) is dropped.Testing
TESTING_GROUP=QAsuite (Aqua + ExplicitImports) run locally and passes 6/6 with the piracy check fully enabled — against the registry ArrayInterface (i.e. before #493 releases), confirming no regression in the interim.Draft — please ignore until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code