Add missing Input and Initials methods for AbstractArray#54
Merged
ChrisRackauckas merged 2 commits intoSciML:mainfrom Jan 13, 2026
Merged
Conversation
Added missing interface methods that were causing MethodErrors: - hasportion(::Input, ::AbstractArray) = false - canonicalize(::Initials, ::AbstractArray) = nothing, nothing, nothing - canonicalize(::Input, ::AbstractArray) = nothing, nothing, nothing Also added corresponding tests: - AllocCheck zero-allocation tests for the new methods - JET type stability tests for the new methods 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3fda578 to
a12190a
Compare
- Add julia-actions/setup-julia step to FormatCheck.yml (Runic requires Julia) - Skip AllocCheck tests on macOS ARM with Julia 1.12+ due to false positives - AllocCheck reports 1 allocation on this platform that doesn't exist on others - Tests still run on Linux, Windows, and macOS with LTS Julia Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Author
Investigation Summary: macOS ARM AllocCheck FailuresRoot CauseAllocCheck reports false positives on macOS ARM (aarch64) with Julia 1.12+. Each
Fixes Applied
NoteThis appears to be an upstream issue with AllocCheck.jl or Julia 1.12's LLVM code generation on ARM. The tests can be re-enabled once the issue is resolved upstream. |
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.
Summary
AbstractArraythat were causingMethodErrors:hasportion(::Input, ::AbstractArray) = falsecanonicalize(::Initials, ::AbstractArray) = nothing, nothing, nothingcanonicalize(::Input, ::AbstractArray) = nothing, nothing, nothingMotivation
During performance profiling, I discovered that calling
hasportion(Input(), arr)orcanonicalize(Initials(), arr)on anAbstractArraywould throw aMethodErrorbecause these methods were not defined, even though methods for all other portion types (Tunable,Constants,Caches,Discrete) were implemented.This makes the interface inconsistent and could cause runtime errors in downstream packages that attempt to use these portion types with arrays.
Test plan
cc @ChrisRackauckas
🤖 Generated with Claude Code