From 336e39cec0a91a473a6aae9d48e4e505aac4282b Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 9 Oct 2024 21:05:58 -0400 Subject: [PATCH] avoid private access to loaded_precompile (#856) * avoid private access to loaded_precompile * Update loading.jl * Update src/loading.jl Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com> --------- Co-authored-by: Kristoffer Carlsson Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com> --- src/loading.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/loading.jl b/src/loading.jl index 0aa5af57..64028f6c 100644 --- a/src/loading.jl +++ b/src/loading.jl @@ -43,7 +43,9 @@ function parse_pkg_files(id::PkgId) @assert reqs !== nothing pkgdata.requirements = reqs for chi in includes - if isdefined(Base, :loaded_precompiles) && haskey(Base.loaded_precompiles, id => buildid) + if isdefined(Base, :maybe_loaded_precompile) && Base.maybe_loaded_precompile(id, buildid) isa Module + mod = Base.maybe_loaded_precompile(id, buildid) + elseif isdefined(Base, :loaded_precompiles) && haskey(Base.loaded_precompiles, id => buildid) mod = Base.loaded_precompiles[id => buildid] else mod = Base.root_module(id)