From e1cdbeff08d6458df3160c744336d506d6497e41 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 20 Feb 2026 23:38:09 -0500 Subject: [PATCH] Fix a JET error around matching methods for `getindex(...)` (#170) 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/170 (https://github.com/JuliaLang/Distributed.jl/commit/d06aa735f9511ac2618884e77e7caf29fdaeb1b1). ``` ┌ setup_launched_worker(manager::Distributed.SSHManager, wconfig::Distributed.WorkerConfig, launched_q::Vector{Int64}) @ Distributed /workpath/Distributed.jl/src/cluster.jl:563 │ no matching method found `getindex(::Nothing, ::Symbol)` (1/2 union split): cnt = ((wconfig::Distributed.WorkerConfig).environ::Union{Nothing, Dict})[:cpu_threads] └──────────────────── ``` (cherry picked from commit d06aa735f9511ac2618884e77e7caf29fdaeb1b1) --- src/cluster.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.jl b/src/cluster.jl index 2c8f2f7..02bc8dd 100644 --- a/src/cluster.jl +++ b/src/cluster.jl @@ -569,7 +569,7 @@ function setup_launched_worker(manager, wconfig, launched_q) # same type. This is done by setting an appropriate value to `WorkerConfig.cnt`. cnt = something(wconfig.count, 1) if cnt === :auto - cnt = wconfig.environ[:cpu_threads] + cnt = (wconfig.environ::AbstractDict)[:cpu_threads] end cnt = cnt - 1 # Removing self from the requested number