Skip to content

Commit

Permalink
Compute loadable_exts for serial pre-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
topolarity committed Oct 29, 2024
1 parent a8c868b commit 4139614
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2545,7 +2545,17 @@ function _require(pkg::PkgId, env=nothing)
# double-check the search now that we have lock
m = _require_search_from_serialized(pkg, path, UInt128(0), true)
m isa Module && return m
return compilecache(pkg, path; reasons)
triggers = get(EXT_PRIMED, pkg, nothing)
loadable_exts = nothing
if triggers !== nothing # extension
loadable_exts = PkgId[]
for (ext′, triggers′) in EXT_PRIMED
if triggers′ triggers
push!(loadable_exts, ext′)
end
end
end
return compilecache(pkg, path; reasons, loadable_exts)
end
loaded isa Module && return loaded
if isnothing(loaded) # maybe_cachefile_lock returns nothing if it had to wait for another process
Expand Down

0 comments on commit 4139614

Please sign in to comment.