Skip to content

Commit

Permalink
prevent precompilation from breaking if Base.PkgId is imported (#42329)
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
KristofferC authored Sep 23, 2021
1 parent 3eeafa6 commit 721932d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 721932d

Please sign in to comment.