Skip to content

Commit

Permalink
Clean-up logs a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Dec 16, 2024
1 parent 3de6a20 commit 2e7e1c3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
16 changes: 8 additions & 8 deletions scripts/evaluate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
13 changes: 10 additions & 3 deletions scripts/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()

0 comments on commit 2e7e1c3

Please sign in to comment.