Skip to content

Commit

Permalink
use require_stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Mar 9, 2024
1 parent 387b385 commit 9c1d08f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9c1d08f

Please sign in to comment.