From 721932d713e7b6af589207b099d4f341a33f9d34 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Thu, 23 Sep 2021 20:52:08 +0200 Subject: [PATCH] prevent precompilation from breaking if Base.PkgId is imported (#42329) `repr` will only print a module prefix if the symbol is not existing in Main but the module prefix is unconditionally needed here since the code will be evaluated in another process. --- base/loading.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/loading.jl b/base/loading.jl index a87a6ed7423c5..b8b998f7a80b6 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1356,8 +1356,8 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, concrete_d for (pkg, build_id) in concrete_deps push!(deps_strs, "$(pkg_str(pkg)) => $(repr(build_id))") end - deps = repr(eltype(concrete_deps)) * "[" * join(deps_strs, ",") * "]" - + deps_eltype = sprint(show, eltype(concrete_deps); context = :module=>nothing) + deps = deps_eltype * "[" * join(deps_strs, ",") * "]" trace = isassigned(PRECOMPILE_TRACE_COMPILE) ? `--trace-compile=$(PRECOMPILE_TRACE_COMPILE[])` : `` io = open(pipeline(`$(julia_cmd()::Cmd) -O0 --output-ji $output --output-incremental=yes