Skip to content

Commit 84c5862

Browse files
show a bit more detail when finished precompiling
1 parent f5b955e commit 84c5862

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

base/precompilation.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,10 @@ import Base: StaleCacheKey
345345

346346
can_fancyprint(io::IO) = io isa Base.TTY && (get(ENV, "CI", nothing) != "true")
347347

348-
function printpkgstyle(io, header, msg; color=:green)
348+
function printpkgstyle(io, header, msg; color=:green, newline=true)
349349
printstyled(io, header; color, bold=true)
350-
println(io, " ", msg)
350+
print(io, " ", msg)
351+
newline && println(io)
351352
end
352353

353354
const Config = Pair{Cmd, Base.CacheFlags}
@@ -919,10 +920,16 @@ function precompilepkgs(pkgs::Vector{String}=String[];
919920
seconds_elapsed = round(Int, (time_ns() - time_start) / 1e9)
920921
ndeps = count(values(was_recompiled))
921922
if ndeps > 0 || !isempty(failed_deps) || (quick_exit && !isempty(std_outputs))
922-
str = sprint() do iostr
923+
str = sprint(context=io) do iostr
923924
if !quick_exit
925+
if fancyprint # replace the progress bar
926+
packages = isempty(requested_pkgs) ? "packages." : "$(join(requested_pkgs, ", "))."
927+
printpkgstyle(iostr, :Precompiling, packages, newline=false)
928+
else
929+
print(iostr, " ") # indent
930+
end
924931
plural = length(configs) > 1 ? "dependency configurations" : ndeps == 1 ? "dependency" : "dependencies"
925-
print(iostr, " $(ndeps) $(plural) successfully precompiled in $(seconds_elapsed) seconds")
932+
print(iostr, " $(ndeps) $(plural) successfully precompiled in $(seconds_elapsed) seconds")
926933
if n_already_precomp > 0 || !isempty(circular_deps)
927934
n_already_precomp > 0 && (print(iostr, ". $n_already_precomp already precompiled"))
928935
!isempty(circular_deps) && (print(iostr, ". $(length(circular_deps)) skipped due to circular dependency"))

0 commit comments

Comments
 (0)