diff --git a/base/loading.jl b/base/loading.jl index f10ed3907d17c..1c4eb2235b31d 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 @@ -1978,7 +1979,7 @@ end finally for modkey in newdeps insert_extension_triggers(modkey) - run_package_callbacks(modkey) + stalecheck && run_package_callbacks(modkey) end empty!(newdeps) end