From 2e7e1c38abac9e54cc7e4da0df66a66a03ca5be0 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 16 Dec 2024 10:57:53 +0100 Subject: [PATCH] Clean-up logs a bit. --- scripts/evaluate.jl | 16 ++++++++-------- scripts/precompile.jl | 13 ++++++++++--- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/scripts/evaluate.jl b/scripts/evaluate.jl index e21e2a89..b68cf345 100644 --- a/scripts/evaluate.jl +++ b/scripts/evaluate.jl @@ -40,24 +40,22 @@ if config.rr == RREnabled end if !isempty(deps) - # we install PkgEval dependencies in a separate environment - Pkg.activate("pkgeval"; shared=true) - io = IOBuffer() Pkg.DEFAULT_IO[] = io try - println("Installing PkgEval dependencies...") + println("Installing PkgEval dependencies (", join(deps, ", "), ")...") + + # we install PkgEval dependencies in a separate environment + Pkg.activate("pkgeval"; shared=true) Pkg.add(deps) - println() catch # something went wrong installing PkgEval's dependencies println(String(take!(io))) rethrow() finally + Pkg.activate() Pkg.DEFAULT_IO[] = nothing end - - Pkg.activate() end # generating package images is really expensive, without much benefit (for PkgEval) @@ -97,7 +95,9 @@ print("\n\n", '#'^80, "\n# Installation\n#\n\n") t0 = cpu_time() try - Pkg.add(convert(Pkg.Types.PackageSpec, pkg)) + spec = convert(Pkg.Types.PackageSpec, pkg) + println("Installing $(spec.name)...") + Pkg.add(spec) println("\nInstallation completed after $(elapsed(t0))") write("/output/installed", repr(true)) diff --git a/scripts/precompile.jl b/scripts/precompile.jl index 2f036eac..9a18f9ef 100644 --- a/scripts/precompile.jl +++ b/scripts/precompile.jl @@ -3,9 +3,14 @@ include("common.jl") config = eval(Meta.parse(ARGS[1])) pkg = eval(Meta.parse(ARGS[2])) -Pkg.activate("pkgeval"; shared=true) +try + Pkg.DEFAULT_IO[] = devnull + Pkg.activate("pkgeval"; shared=true) +finally + Pkg.DEFAULT_IO[] = nothing +end -# precompile PkgEval run-time dependencies (notably BugReporting.jl) +# precompile PkgEval run-time dependencies println("Precompiling PkgEval dependencies...") Pkg.precompile() println() @@ -14,13 +19,15 @@ if config.goal === :test # try to use TestEnv to precompile the package test dependencies try using TestEnv + Pkg.DEFAULT_IO[] = devnull Pkg.activate() TestEnv.activate(pkg.name) catch err @error "Failed to use TestEnv.jl; test dependencies will not be precompiled" exception=(err, catch_backtrace()) Pkg.activate() + Pkg.DEFAULT_IO[] = nothing end end -println("Precompiling $(pkg.name) dependencies...") +println("Precompiling package dependencies...") Pkg.precompile()