From cca41d046415903fceb62b6810ee374857c24af4 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 31 Aug 2025 16:16:33 -0400 Subject: [PATCH 1/2] CI: Run CI on all PRs, even if the base (target) branch is not `master` or `release-*` (#144) (cherry picked from commit 9390857d62393e455232bb36d84e70be422e3a7a) --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32d5da3..41a7379 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,9 @@ name: CI on: pull_request: - branches: - - 'master' - - 'release-*' + # branches: + # - 'master' + # - 'release-*' push: branches: - 'master' From 264b2fdb1c0eb644dca9813e35fab480698fdafd Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Wed, 18 Feb 2026 23:45:26 +0100 Subject: [PATCH 2/2] Ensure correct type parameter of serialized RemoteChannel (#179) When serializing RemoteChannels, a new zeroed RemoteChannel is constructed. However, the input type parameter might be part of an outer type parameter which can then lead to a TypeError during deserialization. The fix is just to reuse the type parameter of the input when constructing the zeroed RemoteChannel. (cherry picked from commit 6649a94075ff6a52ee9558db3ec4491496bf1bea) --- src/remotecall.jl | 4 ++-- test/distributed_exec.jl | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/remotecall.jl b/src/remotecall.jl index d0ac719..a1cbb16 100644 --- a/src/remotecall.jl +++ b/src/remotecall.jl @@ -413,8 +413,8 @@ function serialize(s::AbstractSerializer, ::Future) invoke(serialize, Tuple{AbstractSerializer, Any}, s, zero_fut) end -function serialize(s::AbstractSerializer, ::RemoteChannel) - zero_rc = RemoteChannel{Channel{Any}}((0,0,0)) +function serialize(s::AbstractSerializer, ::RemoteChannel{T}) where T + zero_rc = RemoteChannel{T}((0,0,0)) invoke(serialize, Tuple{AbstractSerializer, Any}, s, zero_rc) end diff --git a/test/distributed_exec.jl b/test/distributed_exec.jl index a218bf6..19d10eb 100644 --- a/test/distributed_exec.jl +++ b/test/distributed_exec.jl @@ -343,9 +343,12 @@ end @testset "Ser/deser to non-ClusterSerializer objects" begin function test_regular_io_ser(ref::DistributedNext.AbstractRemoteRef) io = IOBuffer() - serialize(io, ref) + # Wrapping the ref in a Dict to exercise the case when the + # type parameter of the RemoteChannel is part of an outer type. + # See https://github.com/JuliaLang/Distributed.jl/issues/178 + serialize(io, Dict("ref" => ref)) seekstart(io) - ref2 = deserialize(io) + ref2 = deserialize(io)["ref"] for fld in fieldnames(typeof(ref)) v = getfield(ref2, fld) if isa(v, Number) @@ -361,6 +364,7 @@ end test_regular_io_ser(Future()) test_regular_io_ser(RemoteChannel()) + test_regular_io_ser(RemoteChannel(() -> Channel{Bool}(1))) end @testset "@distributed and [un]buffered reads" begin