File tree 4 files changed +13
-2
lines changed
4 files changed +13
-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)
69
69
@debug " Using _clean_ dep graph"
70
70
end
71
71
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
+
72
77
write_env (temp_ctx. env; update_undo= false )
73
78
74
79
return Base. active_project ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function ctx_and_pkgspec(pkg::AbstractString)
22
22
pkgspec = deepcopy (PackageSpec (pkg))
23
23
ctx = Context ()
24
24
isinstalled! (ctx, pkgspec) || throw (TestEnvError (" $pkg not installed 👻" ))
25
- Pkg. instantiate (ctx)
25
+ Pkg. instantiate (ctx; allow_autoprecomp = false ) # do precomp later within sandbox
26
26
return ctx, pkgspec
27
27
end
28
28
Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
69
69
@debug " Using _clean_ dep graph"
70
70
end
71
71
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
+
72
77
write_env (temp_ctx. env; update_undo= false )
73
78
74
79
return Base. active_project ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function ctx_and_pkgspec(pkg::AbstractString)
22
22
pkgspec = deepcopy (PackageSpec (pkg))
23
23
ctx = Context ()
24
24
isinstalled! (ctx, pkgspec) || throw (TestEnvError (" $pkg not installed 👻" ))
25
- Pkg. instantiate (ctx)
25
+ Pkg. instantiate (ctx; allow_autoprecomp = false ) # do precomp later within sandbox
26
26
return ctx, pkgspec
27
27
end
28
28
50
50
51
51
function test_dir_has_project_file (ctx, pkgspec)
52
52
test_dir = get_test_dir (ctx, pkgspec)
53
+ @show test_dir
53
54
test_dir === nothing && return false
54
55
return isfile (joinpath (test_dir, " Project.toml" ))
55
56
end
You can’t perform that action at this time.
0 commit comments