From 9c1d08fbfd1b90a265da2c885b898f859575bd6d Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 9 Mar 2024 07:03:44 -0500 Subject: [PATCH] use require_stdlib --- stdlib/REPL/src/REPL.jl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/stdlib/REPL/src/REPL.jl b/stdlib/REPL/src/REPL.jl index 8d57e6a8e4e26..0c88c84b3cbc2 100644 --- a/stdlib/REPL/src/REPL.jl +++ b/stdlib/REPL/src/REPL.jl @@ -249,7 +249,7 @@ function check_for_missing_packages_and_run_hooks(ast) mods = modules_to_be_loaded(ast) filter!(mod -> isnothing(Base.identify_package(String(mod))), mods) # keep missing modules if !isempty(mods) - isempty(install_packages_hooks) && load_pkg() + isempty(install_packages_hooks) && Base.require_stdlib(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg")) for f in install_packages_hooks Base.invokelatest(f, mods) && return end @@ -1585,16 +1585,6 @@ function run_frontend(repl::StreamREPL, backend::REPLBackendRef) nothing end -function load_pkg() - Base.generating_output(true) && return nothing - pkgid = Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg") - if Base.locate_package(pkgid) !== nothing # Only try load Pkg if we can find it - Pkg = Base.require(pkgid) - return Pkg - end - return nothing -end - module Numbered using ..REPL