File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
6969 @debug " Using _clean_ dep graph"
7070 end
7171
72+ # Now that we have set up the sandbox environment, precompile all its packages:
73+ # (Reconnect the `io` back to the original context so the caller can see the
74+ # precompilation progress.)
75+ Pkg. precompile (temp_ctx; io= ctx. io)
76+
7277 write_env (temp_ctx. env; update_undo= false )
7378
7479 return Base. active_project ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function ctx_and_pkgspec(pkg::AbstractString)
2222 pkgspec = deepcopy (PackageSpec (pkg))
2323 ctx = Context ()
2424 isinstalled! (ctx, pkgspec) || throw (TestEnvError (" $pkg not installed 👻" ))
25- Pkg. instantiate (ctx)
25+ Pkg. instantiate (ctx; allow_autoprecomp = false ) # do precomp later within sandbox
2626 return ctx, pkgspec
2727end
2828
Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
6969 @debug " Using _clean_ dep graph"
7070 end
7171
72+ # Now that we have set up the sandbox environment, precompile all its packages:
73+ # (Reconnect the `io` back to the original context so the caller can see the
74+ # precompilation progress.)
75+ Pkg. precompile (temp_ctx; io= ctx. io)
76+
7277 write_env (temp_ctx. env; update_undo= false )
7378
7479 return Base. active_project ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function ctx_and_pkgspec(pkg::AbstractString)
2222 pkgspec = deepcopy (PackageSpec (pkg))
2323 ctx = Context ()
2424 isinstalled! (ctx, pkgspec) || throw (TestEnvError (" $pkg not installed 👻" ))
25- Pkg. instantiate (ctx)
25+ Pkg. instantiate (ctx; allow_autoprecomp = false ) # do precomp later within sandbox
2626 return ctx, pkgspec
2727end
2828
You can’t perform that action at this time.
0 commit comments