Skip to content

Support ArraysOfArrays v1 - #74

Open
oschulz wants to merge 1 commit into
gridap:mainfrom
oschulz:support-arraysofarrays-v1
Open

Support ArraysOfArrays v1#74
oschulz wants to merge 1 commit into
gridap:mainfrom
oschulz:support-arraysofarrays-v1

Conversation

@oschulz

@oschulz oschulz commented Aug 27, 2026

Copy link
Copy Markdown

ArraysOfArrays.jl had a breaking release, I let Claude Code prepare dependency-updates for downstream packages, this is one of them:

This supersedes the CompatHelper PR #73. That PR widens the compat entry alone, and its CI fails with

UndefVarError: front_tuple not defined in GridapROMs.ParamDataStructures

because front_tuple was an unexported internal helper of ArraysOfArrays, and v1 renamed it to _front_tuple. Neither name exists in both majors, so the import has to go rather than be renamed.

Closes #73

The change

Besides the compat bump to "0.6, 1", two lines:

-import ArraysOfArrays: front_tuple,innersize,_ncolons
+import ArraysOfArrays: innersize,_ncolons
-innersize(A::ConsecutiveParamArray{T,N}) where {T,N} = front_tuple(size(get_all_data(A)),Val{N}())
+innersize(A::ConsecutiveParamArray{T,N}) where {T,N} = Base.front(size(get_all_data(A)))

This was the only use of front_tuple in the repo. A ConsecutiveParamArray{T,N} stores its data as an M = N+1-dimensional array, so taking the first N entries of the data size is exactly Base.front of it — the two expressions agree by construction, and Base.front works on every supported Julia version, so the result is compatible with ArraysOfArrays 0.6 and 1 alike.

Verification

I ran test/FEM/param_data_structures.jl from the committed branch in fresh --depwarn=yes sessions against both majors:

ArraysOfArrays Result
1.0.2 Test Summary: param data structures | Pass 169 | Total 169 — passed
0.6.6 Test Summary: param data structures | Pass 169 | Total 169 — passed

No deprecation or undefined-binding warnings in either configuration. I also spot-checked innersize, innerlength, inneraxes and the _ncolons indexing paths on ConsecutiveParamVector/ConsecutiveParamMatrix directly, with identical results on both versions. I did not run the full suite — the Gridap stack is heavy — so I've left that to your CI.

One note, and a small request

_ncolons is likewise an ArraysOfArrays internal. It does still exist in v1, so nothing is broken and this PR leaves it alone — but it is a one-liner (_ncolons(::Val{N}) where N = ntuple(_ -> Colon(), Val{N}())), and defining it locally would remove GridapROMs' last coupling to ArraysOfArrays internals and rule out this class of breakage in future. Happy to add that here if you'd like it.

If this looks good to you, would you be willing to tag a patch release once it's merged? The registry resolves compat from released versions, so without a tag GridapROMs would still hold its users back to ArraysOfArrays 0.6. Happy to answer any questions about the v1 changes if something comes up.

🤖 Generated with Claude Code

Widen the ArraysOfArrays compat entry to "0.6, 1" and stop importing the
private helper `front_tuple`, which ArraysOfArrays v1 renamed: the only
use, the inner size of a `ConsecutiveParamArray`, is `Base.front` of the
data size, since the data always has one more dimension than the inner
arrays. This makes the code work with ArraysOfArrays 0.6 and 1 alike.

Created by generative AI.
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.

1 participant