Skip to content

Commit e3421e6

Browse files
committed
precompilation: remove log spam from prior commit
This was moved here in "fail in (closer to) linear time and linear error messages", forgetting that this normally runs in the child process and isinteractive is disabled there.
1 parent f7fb900 commit e3421e6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

base/precompilation.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,13 @@ function _precompilepkgs(pkgs::Union{Vector{String}, Vector{PkgId}},
608608
logio = io
609609
logcalls = nothing
610610
if _from_loading
611-
if !isinteractive()
611+
if isinteractive()
612+
logcalls = CoreLogging.Info # sync with Base.compilecache
613+
else
612614
logio = IOContext{IO}(devnull)
613615
fancyprint = false
616+
logcalls = CoreLogging.Debug # sync with Base.compilecache
614617
end
615-
logcalls = isinteractive() ? CoreLogging.Info : CoreLogging.Debug # sync with Base.compilecache
616618
end
617619

618620
nconfigs = length(configs)
@@ -1068,7 +1070,9 @@ function _precompilepkgs(pkgs::Union{Vector{String}, Vector{PkgId}},
10681070
# Heuristic for when precompilation is disabled, which must not over-estimate however for any dependent
10691071
# since it will also block precompilation of all dependents
10701072
if _from_loading && single_requested_pkg && occursin(r"\b__precompile__\(\s*false\s*\)", read(sourcepath, String))
1071-
Base.@logmsg logcalls "Disabled precompiling $(repr("text/plain", pkg)) since the text `__precompile__(false)` was found in file."
1073+
@lock print_lock begin
1074+
Base.@logmsg logcalls "Disabled precompiling $(repr("text/plain", pkg)) since the text `__precompile__(false)` was found in file."
1075+
end
10721076
notify(was_processed[pkg_config])
10731077
continue
10741078
end
@@ -1139,8 +1143,8 @@ function _precompilepkgs(pkgs::Union{Vector{String}, Vector{PkgId}},
11391143
push!(freshpaths, freshpath)
11401144
return nothing # returning nothing indicates another process did the recompile
11411145
end
1142-
logcalls === nothing || @lock print_lock begin
1143-
Base.@logmsg logcalls "Precompiling $(repr("text/plain", pkg))"
1146+
logcalls === CoreLogging.Debug && @lock print_lock begin
1147+
@debug "Precompiling $(repr("text/plain", pkg))"
11441148
end
11451149
Base.compilecache(pkg, sourcepath, std_pipe, std_pipe, !ignore_loaded;
11461150
flags, cacheflags, loadable_exts)

0 commit comments

Comments
 (0)