Skip to content

Commit 9ed1027

Browse files
committed
Fix JET errors around matching methods for send_msg_now(...) (#165)
``` ┌ @ Distributed /workpath/Distributed.jl/src/process_messages.jl:321 │ no matching method found `send_msg_now(::Distributed.LocalProcess, ::Distributed.MsgHeader, ::Distributed.IdentifySocketAckMsg)` (1/2 union split): Distributed.send_msg_now(w, Distributed.MsgHeader()::Distributed.MsgHeader, Distributed.IdentifySocketAckMsg()::Distributed.IdentifySocketAckMsg) └──────────────────── ``` ``` ┌ @ Distributed /workpath/Distributed.jl/src/process_messages.jl:359 │ no matching method found `send_msg_now(::Distributed.LocalProcess, ::Distributed.MsgHeader, ::Distributed.JoinCompleteMsg)` (1/2 union split): Distributed.send_msg_now(controller::Union{Distributed.LocalProcess, Distributed.Worker}, Distributed.MsgHeader(Distributed.RRID(0, 0)::Distributed.RRID, (header::Distributed.MsgHeader).notify_oid::Distributed.RRID)::Distributed.MsgHeader, Distributed.JoinCompleteMsg((Distributed.Sys).CPU_THREADS::Int64, Distributed.getpid()::Int32)::Distributed.JoinCompleteMsg) └──────────────────── ``` ``` ┌ connect_to_peer(manager::Distributed.ClusterManager, rpid::Int64, wconfig::Distributed.WorkerConfig) @ Distributed /workpath/Distributed.jl/src/process_messages.jl:368 │ no matching method found `send_msg_now(::Distributed.LocalProcess, ::Distributed.MsgHeader, ::Distributed.IdentifySocketMsg)` (1/2 union split): Distributed.send_msg_now(w, Distributed.MsgHeader()::Distributed.MsgHeader, Distributed.IdentifySocketMsg(myid()::Int64)::Distributed.IdentifySocketMsg) └──────────────────── ``` ``` ┌ send_msg_now(s::Base.PipeEndpoint, header::Distributed.MsgHeader, msg::Distributed.ResultMsg) @ Distributed //workl/clones/JuliaLang/Distributed.jl/src/messages.jl:113 │ no matching method found `send_msg_now(::Distributed.LocalProcess, ::Distributed.MsgHeader, ::Distributed.(1/2 union split): Distributed.send_msg_now(Distributed.worker_from_id(id::Int64)::Union{Distributed.LocalProcess, Worker}, header::Distributed.MsgHeader, msg::Distributed.ResultMsg) └──────────────────── ``` (cherry picked from commit 305d6fc4280de14f015c13a080c785bf68c34785) (cherry picked from commit 871e3d746ab0c7668462f7b88515a362da9c11f1)
1 parent 3851bdc commit 9ed1027

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/messages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ end
110110
function send_msg_now(s::IO, header, msg::AbstractMsg)
111111
id = worker_id_from_socket(s)
112112
if id > -1
113-
return send_msg_now(worker_from_id(id), header, msg)
113+
return send_msg_now(worker_from_id(id)::Worker, header, msg)
114114
end
115115
send_msg_unknown(s, header, msg)
116116
end

src/process_messages.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ end
316316

317317
function handle_msg(msg::IdentifySocketMsg, header, r_stream, w_stream, version)
318318
# register a new peer worker connection
319-
w = Worker(msg.from_pid, r_stream, w_stream, cluster_manager; version=version)
319+
w = Worker(msg.from_pid, r_stream, w_stream, cluster_manager; version=version)::Worker
320320
send_connection_hdr(w, false)
321321
send_msg_now(w, MsgHeader(), IdentifySocketAckMsg())
322322
notify(w.initialized)
@@ -329,7 +329,7 @@ end
329329

330330
function handle_msg(msg::JoinPGRPMsg, header, r_stream, w_stream, version)
331331
LPROC.id = msg.self_pid
332-
controller = Worker(1, r_stream, w_stream, cluster_manager; version=version)
332+
controller = Worker(1, r_stream, w_stream, cluster_manager; version=version)::Worker
333333
notify(controller.initialized)
334334
register_worker(LPROC)
335335
topology(msg.topology)
@@ -362,7 +362,7 @@ end
362362
function connect_to_peer(manager::ClusterManager, rpid::Int, wconfig::WorkerConfig)
363363
try
364364
(r_s, w_s) = connect(manager, rpid, wconfig)
365-
w = Worker(rpid, r_s, w_s, manager; config=wconfig)
365+
w = Worker(rpid, r_s, w_s, manager; config=wconfig)::Worker
366366
process_messages(w.r_stream, w.w_stream, false)
367367
send_connection_hdr(w, true)
368368
send_msg_now(w, MsgHeader(), IdentifySocketMsg(myid()))

0 commit comments

Comments
 (0)