diff --git a/base/loading.jl b/base/loading.jl index f10ed3907d17c..4f7249e693d8b 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1935,9 +1935,10 @@ end dep = staledeps[i] dep isa Module && continue modpath, modkey, modbuild_id, modcachepath, modstaledeps, modocachepath = dep::Tuple{String, PkgId, UInt128, String, Vector{Any}, Union{Nothing, String}} - dep = get(loaded_precompiles, modkey => modbuild_id, nothing) - if dep === nothing + if stalecheck dep = maybe_root_module(modkey) + else + dep = get(loaded_precompiles, modkey => modbuild_id, nothing) end while true if dep isa Module