Skip to content

Support ArraysOfArrays v1 - #23

Merged
AntonOresten merged 1 commit into
MurrellGroup:mainfrom
oschulz:support-arraysofarrays-v1
Aug 27, 2026
Merged

AntonOresten merged 1 commit into
MurrellGroup:mainfrom
oschulz:support-arraysofarrays-v1

Conversation

@oschulz

@oschulz oschulz commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Hi! I maintain ArraysOfArrays.jl, and since v1 is now out I went through the downstream packages that depend on it — this PR makes ForwardBackward.jl work with it.

What changed in ArraysOfArrays v1

The element type of an ArrayOfSimilarArrays is now a view rather than a copy, and as part of that cleanup the nested-array constructors (ArrayOfSimilarArrays(A::AbstractArray{<:AbstractArray})) and nestedview were deprecated in favour of convert/stacked and sliced.

The changes here

Two call sites in src/manifolds.jl use the deprecated APIs:

before after
ArrayOfSimilarArrays(state) convert(ArrayOfSimilarArrays, state)
nestedview(nt.data, length(innersize(state.state))) ArrayOfSimilarArrays{eltype(nt.data), length(innersize(state.state))}(nt.data)

Both replacements are cross-version: convert(::Type{ArrayOfSimilarArrays}, ::AbstractArray{<:AbstractArray}) and the ArrayOfSimilarArrays{T,M}(flat_data) constructor exist, undeprecated, in ArraysOfArrays 0.6.5, 0.6.6 and 1.0.x alike. So the compat entry widens to "0.6.5, 1" rather than dropping 0.6 — nobody currently on 0.6 is forced to move.

Everything else already carried over unchanged: flatview, innersize, and the <:ArrayOfSimilarArrays dispatch in Functors.functor all behave the same in v1.

Nothing else is touched — no version bump, no julia compat change, no test changes.

Verification

Against ArraysOfArrays 1.0.2, 0.6.6 and 0.6.5 in turn, each in a fresh julia --depwarn=yes session:

  • Pkg.test() — 93/93 passing on all three.
  • The package's own test suite has no Manifolds dependency, so it never touches these two lines. I therefore ran targeted checks with Manifolds loaded (so ManifoldsExt is active): ManifoldState on Sphere(2) from a nested array of points, on ProbabilitySimplex(2) via the integer constructor in the extension, plus Functors.functor/fmap round trips through the reconstruct closure (which is what exercises the second line), tensor, similar, copy, interpolate and endpoint_conditioned_sample (deterministic and stochastic).
  • All points stayed on their manifolds, and the recorded numeric outputs are byte-identical across all three ArraysOfArrays versions.
  • No deprecation warnings on any version. As a negative control I confirmed the harness does catch both original forms under v1, so the clean run isn't a false negative.

Two small notes

  • Your CompatHelper workflow is currently in state disabled_inactivity (GitHub auto-disables scheduled workflows on repos after a period of inactivity), so no automated compat bump would have reached you here — worth re-enabling if you want those PRs back.
  • Entirely optional, but a minimal Manifolds-based testset would give CI coverage of this ManifoldState/Functors path, which is the only part of the package that touches these APIs.

A small request

If this looks good, a patch release (0.1.6) would let the registry admit ArraysOfArrays 1 for ForwardBackward — Flowfusion.jl then picks it up automatically through its own bounds. Happy to adjust anything here, and thanks for the package!

🤖 Generated with Claude Code

Widen the ArraysOfArrays compat entry to "0.6.5, 1" and replace the two
call sites that ArraysOfArrays v1 deprecates by their cross-version
equivalents: the nested-array constructor by `convert(ArrayOfSimilarArrays,
...)` and `nestedview(A, M)` by the `ArrayOfSimilarArrays{T,M}(A)`
constructor. Both forms exist unchanged in ArraysOfArrays 0.6.

Created by generative AI.
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.65%. Comparing base (1fdd4d6) to head (19905f1).

Files with missing lines Patch % Lines
src/manifolds.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #23   +/-   ##
=======================================
  Coverage   49.65%   49.65%           
=======================================
  Files           8        8           
  Lines         431      431           
=======================================
  Hits          214      214           
  Misses        217      217           

☔ 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.

@AntonOresten
AntonOresten merged commit 3decba5 into MurrellGroup:main Aug 27, 2026
8 of 9 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