From a04809de73627cff0f4b6a7324c2862ce7870d81 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 20 Feb 2026 23:35:31 -0500 Subject: [PATCH] Fix a JET error by narrowing the type signature of the `create_worker(x, y)` function (#175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a forward-port of https://github.com/JuliaLang/Distributed.jl/pull/175 (https://github.com/JuliaLang/Distributed.jl/commit/d65a9960ae358806312c1adf35f45c62f02caf0b). ``` ┌ create_worker(manager::Any, wconfig::Any) @ Distributed /workpath/Distributed.jl/src/cluster.jl:620 │ no matching method found `kwcall(::NamedTuple{(:config,), <:Tuple{Any}}, ::Type{Distributed.Worker}, ::Any, ::Sockets.TCPSocket, ::Sockets.TCPSocket, ::Base.LibuvStream)` (1/2 union split): Core.kwcall(NamedTuple{(:config,)}(tuple(wconfig::Any)::Tuple{Any})::NamedTuple{(:config,), <:Tuple{Any}}, Distributed.Worker, (getfield(w::Core.Box, :contents)::Any).id::Any, r_s::Sockets.TCPSocket, w_s::Sockets.TCPSocket, manager::Union{Base.LibuvStream, Distributed.ClusterManager}) └──────────────────── ``` (cherry picked from commit d65a9960ae358806312c1adf35f45c62f02caf0b) --- src/cluster.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.jl b/src/cluster.jl index 2c8f2f7..463e501 100644 --- a/src/cluster.jl +++ b/src/cluster.jl @@ -607,7 +607,7 @@ function launch_n_additional_processes(manager, frompid, fromconfig, cnt, launch end end -function create_worker(manager, wconfig) +function create_worker(manager::ClusterManager, wconfig::WorkerConfig) # only node 1 can add new nodes, since nobody else has the full list of address:port @assert LPROC.id == 1 timeout = worker_timeout()