Skip to content

Commit

Permalink
#54739-related fixes for loading stdlibs (#54891)
Browse files Browse the repository at this point in the history
This fixes a couple unconventional issues people encountered and were
able to report as bugs against #54739

Note that due to several bugs in REPLExt itself
(#54889,
#54888), loading the extension
may still crash julia in some circumstances, but that is now a Pkg bug,
and no longer the fault of the loading code.

(cherry picked from commit a7fa1e7)
  • Loading branch information
vtjnash authored and KristofferC committed Jul 23, 2024
1 parent 19f838f commit bddb4ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1886,9 +1886,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
Expand Down Expand Up @@ -1929,7 +1930,7 @@ end
finally
for modkey in newdeps
insert_extension_triggers(modkey)
run_package_callbacks(modkey)
stalecheck && run_package_callbacks(modkey)
end
empty!(newdeps)
end
Expand Down

0 comments on commit bddb4ed

Please sign in to comment.