Skip to content

Commit

Permalink
Don't throw during auto-precompilation
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Aug 8, 2023
1 parent 14002c4 commit c55ffa2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1574,9 +1574,15 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
pluralde = n_direct_errs == 1 ? "y" : "ies"
direct = strict ? "" : "direct "
err_msg = "The following $n_direct_errs $(direct)dependenc$(pluralde) failed to precompile:\n$(err_str[1:end-1])"
if internal_call && isinteractive() && !get(ENV, "CI", false)
println(io, " To see a full report use `", color_string("julia>", :green), " err`")
setglobal!(Base.MainInclude, :err, PkgError(err_msg))
if internal_call # aka. auto-precompilation
if isinteractive() && !get(ENV, "CI", false)
println(io, " To see a full report use `", color_string("julia>", :green), " err`")
setglobal!(Base.MainInclude, :err, PkgError(err_msg))
else
# auto-precompilation shouldn't throw but if the user can't easily access the
# error messages, just show them
print(io, err_msg)
end
else
println(io, "")
pkgerror(err_msg)
Expand Down

0 comments on commit c55ffa2

Please sign in to comment.