Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/julia-1.11/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
@debug "Using _clean_ dep graph"
end

# Now that we have set up the sandbox environment, precompile all its packages:
# (Reconnect the `io` back to the original context so the caller can see the
# precompilation progress.)
Pkg.precompile(temp_ctx; io=ctx.io)

write_env(temp_ctx.env; update_undo=false)

return Base.active_project()
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.11/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function ctx_and_pkgspec(pkg::AbstractString)
pkgspec = deepcopy(PackageSpec(pkg))
ctx = Context()
isinstalled!(ctx, pkgspec) || throw(TestEnvError("$pkg not installed 👻"))
Pkg.instantiate(ctx)
Pkg.instantiate(ctx; allow_autoprecomp = false) # do precomp later within sandbox
return ctx, pkgspec
end

Expand Down
5 changes: 5 additions & 0 deletions src/julia-1.9/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
@debug "Using _clean_ dep graph"
end

# Now that we have set up the sandbox environment, precompile all its packages:
# (Reconnect the `io` back to the original context so the caller can see the
# precompilation progress.)
Pkg.precompile(temp_ctx; io=ctx.io)

write_env(temp_ctx.env; update_undo=false)

return Base.active_project()
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.9/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function ctx_and_pkgspec(pkg::AbstractString)
pkgspec = deepcopy(PackageSpec(pkg))
ctx = Context()
isinstalled!(ctx, pkgspec) || throw(TestEnvError("$pkg not installed 👻"))
Pkg.instantiate(ctx)
Pkg.instantiate(ctx; allow_autoprecomp = false) # do precomp later within sandbox
return ctx, pkgspec
end

Expand Down