From f2d1276be8a1d4831addb62376eb19550494d3d1 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Tue, 3 Oct 2023 08:04:36 -0400 Subject: [PATCH] Fix last startup & shutdown precompiles (#51557) --- contrib/generate_precompile.jl | 6 ++++++ stdlib/REPL/src/precompile.jl | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl index 23320df96e730..582e5410a4b3d 100644 --- a/contrib/generate_precompile.jl +++ b/contrib/generate_precompile.jl @@ -45,6 +45,11 @@ precompile(isequal, (String, String)) precompile(Base.check_open, (Base.TTY,)) precompile(Base.getproperty, (Base.TTY, Symbol)) precompile(write, (Base.TTY, String)) +precompile(Tuple{typeof(Base.get), Base.TTY, Symbol, Bool}) +precompile(Tuple{typeof(Base.hashindex), String, Int64}) +precompile(Tuple{typeof(Base.write), Base.GenericIOBuffer{Array{UInt8, 1}}, String}) +precompile(Tuple{typeof(Base.indexed_iterate), Tuple{Nothing, Int64}, Int64}) +precompile(Tuple{typeof(Base.indexed_iterate), Tuple{Nothing, Int64}, Int64, Int64}) # used by Revise.jl precompile(Tuple{typeof(Base.parse_cache_header), String}) @@ -57,6 +62,7 @@ precompile(Tuple{typeof(delete!), Dict{Base.PkgId,Vector{Function}}, Base.PkgId} precompile(Tuple{typeof(push!), Vector{Function}, Function}) # miscellaneous +precompile(Tuple{typeof(Base.exit)}) precompile(Tuple{typeof(Base.require), Base.PkgId}) precompile(Tuple{typeof(Base.recursive_prefs_merge), Base.Dict{String, Any}}) precompile(Tuple{typeof(Base.recursive_prefs_merge), Base.Dict{String, Any}, Base.Dict{String, Any}, Vararg{Base.Dict{String, Any}}}) diff --git a/stdlib/REPL/src/precompile.jl b/stdlib/REPL/src/precompile.jl index 7985cf426a250..7e763e51eb1d4 100644 --- a/stdlib/REPL/src/precompile.jl +++ b/stdlib/REPL/src/precompile.jl @@ -25,6 +25,7 @@ const PARALLEL_PRECOMPILATION = true const debug_output = devnull # or stdout CTRL_C = '\x03' +CTRL_D = '\x04' CTRL_R = '\x12' UP_ARROW = "\e[A" DOWN_ARROW = "\e[B" @@ -130,7 +131,7 @@ generate_precompile_statements() = try sleep(0.1) end end - write(ptm, "exit()\n") + write(ptm, "$CTRL_D") wait(tee) success(p) || Base.pipeline_error(p) close(ptm)