diff --git a/base/loading.jl b/base/loading.jl index dd7038845f4f8f..ef0d5e4bf6f5f9 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1954,7 +1954,7 @@ function _require(pkg::PkgId, env=nothing) pkg_precompile_attempted = true unlock(require_lock) try - PKG_PRECOMPILE_HOOK[](pkg.name, _from_loading = true) + @invokelatest PKG_PRECOMPILE_HOOK[](pkg.name, _from_loading = true) finally lock(require_lock) end