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.
  • Loading branch information
vtjnash authored Jun 24, 2024
2 parents 36a0da0 + b260cab commit a7fa1e7
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 @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a7fa1e7

Please sign in to comment.