Skip to content

Commit

Permalink
precompile: stop swallowing internal errors (#3584)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Aug 15, 2023
1 parent 46b7eef commit 41c9244
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,9 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
println(io, " Interrupted: Exiting precompilation...")
end
interrupted = true
return true
else
return false
end
end

Expand Down Expand Up @@ -1384,7 +1387,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
wait(t)
end
catch err
handle_interrupt(err, true)
handle_interrupt(err, true) || rethrow()
finally
fancyprint && print(io, ansi_enablecursor)
end
Expand Down Expand Up @@ -1492,7 +1495,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
n_done += 1
notify(was_processed[pkg])
catch err_outer
handle_interrupt(err_outer)
handle_interrupt(err_outer) || rethrow()
notify(was_processed[pkg])
finally
filter!(!istaskdone, tasks)
Expand All @@ -1505,7 +1508,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
try
wait(interrupted_or_done)
catch err
handle_interrupt(err)
handle_interrupt(err) || rethrow()
finally
Base.LOADING_CACHE[] = nothing
end
Expand Down

0 comments on commit 41c9244

Please sign in to comment.