From f4f840b0a66c73bfbdcf37ca046278c823501bac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 12:43:04 +0000 Subject: [PATCH 1/4] Update CUDA requirement 6.0 Updates the requirements on [CUDA](https://github.com/JuliaGPU/CUDA.jl) to permit the latest version. Updates `CUDA` to 6.0.0 - [Release notes](https://github.com/JuliaGPU/CUDA.jl/releases) - [Commits](https://github.com/JuliaGPU/CUDA.jl/compare/v5.0.0...v6.0.0) --- updated-dependencies: - dependency-name: CUDA dependency-version: 6.0.0 dependency-type: direct:production dependency-group: all-julia-packages ... Signed-off-by: dependabot[bot] --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 3e4f6620..844d8055 100644 --- a/Project.toml +++ b/Project.toml @@ -52,7 +52,7 @@ RecursiveArrayToolsZygoteExt = "Zygote" Adapt = "4" Aqua = "0.8" ArrayInterface = "7.16" -CUDA = "5" +CUDA = "5, 6.0" DocStringExtensions = "0.9.3" FastBroadcast = "1.3" ForwardDiff = "0.10.38, 1" From 273a06565fa2ac48a60ed7cbb9fe0da098cb5daf Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 17 Apr 2026 09:44:05 -0400 Subject: [PATCH 2/4] Preserve container type in `zero(VectorOfArray)` via `rewrap` `[zero(u) for u in VA.u]` always produces a plain `Vector`, even when `VA.u` is a `StructVector` (from StructArrays.jl). The constructor then fails with `MethodError: Cannot convert Vector{SVector{1,Float64}} to StructVector{...}` because the type parameter `A` is locked to the original container type. Use the existing `rewrap(parent, u)` mechanism (already used by broadcast) to convert the comprehension result back to the original container type. The `StructArrays` extension defines `rewrap(::StructArray, u) = StructArray(u)`, and the fallback is `convert(typeof(parent), u)`. Fixes OrdinaryDiffEq.jl v7 CI failures in OrdinaryDiffEqLowStorageRK and OrdinaryDiffEqSSPRK "VectorOfArray/StructArray compatibility" tests. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.6 (1M context) --- src/vector_of_array.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector_of_array.jl b/src/vector_of_array.jl index be0041d5..191a5eb2 100644 --- a/src/vector_of_array.jl +++ b/src/vector_of_array.jl @@ -945,7 +945,7 @@ end function Base.zero(VA::AbstractVectorOfArray) T = typeof(VA) - u_zero = [zero(u) for u in VA.u] + u_zero = rewrap(VA.u, [zero(u) for u in VA.u]) fields = [fname == :u ? u_zero : _copyfield(VA, fname) for fname in fieldnames(T)] return T(fields...) end From 5ddceee8a16106f2a7fb161c29ba724184218bf1 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 17 Apr 2026 11:05:01 -0400 Subject: [PATCH 3/4] Add test for zero(VectorOfArray) preserving StructArray container type Verifies that the rewrap-based fix correctly returns a VectorOfArray whose .u field is still a StructArray (not a plain Vector) and that all values are zeroed. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Sonnet 4.6 --- test/copy_static_array_test.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/copy_static_array_test.jl b/test/copy_static_array_test.jl index 5969c714..5fd42ffe 100644 --- a/test/copy_static_array_test.jl +++ b/test/copy_static_array_test.jl @@ -131,3 +131,13 @@ x_immutablefv = [ImmutableFV(1.0, 2.0)] for vec in [x_staticvector, x_structarray, x_mutablefv, x_immutablefv] @test typeof(similar(VectorOfArray(vec))) === typeof(VectorOfArray(vec)) end + +# Test that zero(VectorOfArray) preserves StructArray container type (via rewrap) +let + sa = StructArray{SVector{2, Float64}}((Float64[1.0, 2.0], Float64[3.0, 4.0])) + voa = VectorOfArray(sa) + z = zero(voa) + @test z.u isa StructArray + @test all(iszero, z.u[1]) + @test all(iszero, z.u[2]) +end From fd393809c905067ca00d9de310a1a3623ca895e5 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 17 Apr 2026 15:14:39 +0000 Subject: [PATCH 4/4] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 844d8055..539057c5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "RecursiveArrayTools" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" authors = ["Chris Rackauckas "] -version = "4.1.0" +version = "4.2.0" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"