Skip to content

Commit

Permalink
fixup! defer callbacks after precompile loading
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Feb 19, 2024
1 parent 0c12c8a commit 2f2b2f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@ end
continue
end
modstaledeps, modocachepath = modstaledeps::Tuple{Vector{Any}, Union{Nothing, String}}
staledeps[i] = (modpath, modkey, modpath_to_try, modstaledeps, modocachepath)
staledeps[i] = (modpath, modkey, modbuild_id, modpath_to_try, modstaledeps, modocachepath)
@goto check_next_dep
end
@debug "Rejecting cache file $path_to_try because required dependency $modkey with build ID $(UUID(modbuild_id)) is missing from the cache."
Expand All @@ -1823,14 +1823,14 @@ end
for i in 1:length(staledeps)
dep = staledeps[i]
dep isa Module && continue
modpath, modkey, modcachepath, modstaledeps, modocachepath = dep::Tuple{String, PkgId, String, Vector{Any}, Union{Nothing, String}}
modpath, modkey, modbuild_id, modcachepath, modstaledeps, modocachepath = dep::Tuple{String, PkgId, UInt128, String, Vector{Any}, Union{Nothing, String}}
dep = nothing
if root_module_exists(modkey)
dep = root_module(modkey)
end
while true
if dep isa Module
if PkgId(dep) == modkey && module_build_id(dep) === build_id
if PkgId(dep) == modkey && module_build_id(dep) === modbuild_id
break
else
if stalecheck
Expand Down
2 changes: 1 addition & 1 deletion stdlib/REPL/test/precompilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if !Sys.iswindows()
tracecompile_out = read(f, String)
close(ptm) # close after reading so we don't get precompiles from error shutdown

expected_precompiles = 2
expected_precompiles = 1

n_precompiles = count(r"precompile\(", tracecompile_out)

Expand Down

0 comments on commit 2f2b2f3

Please sign in to comment.