Skip to content

Commit

Permalink
precompilation: capture stdout during code load precomp
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Aug 9, 2023
1 parent b044bf6 commit 18deb1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1449,8 +1449,10 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
# a functionally identical package cache (except for preferences, which may differ)
t = @elapsed ret = maybe_cachefile_lock(io, print_lock, fancyprint, pkg, pkgspidlocked) do
Logging.with_logger(Logging.NullLogger()) do
# capture stderr, send stdout to devnull, don't skip loaded modules
Base.compilecache(pkg, sourcepath, iob, devnull, false)
# For Pkg.precompile capture stderr, send stdout to devnull.
# For code load precompilation capture both.
# In both cases don't skip loaded modules.
Base.compilecache(pkg, sourcepath, iob, _from_loading ? iob : devnull, false)
end
end
t_str = timing ? string(lpad(round(t * 1e3, digits = 1), 9), " ms") : ""
Expand Down

0 comments on commit 18deb1e

Please sign in to comment.