Skip to content

Commit 4b8e390

Browse files
Precompile Pkg.activate() (#3540)
Co-authored-by: Ian Butterworth <[email protected]>
1 parent e43501b commit 4b8e390

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/precompile.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,29 @@ function pkg_precompile()
9393
Pkg.REPLMode.try_prompt_pkg_add(Symbol[:notapackage])
9494
Pkg.update(; update_registry=false)
9595
Pkg.status()
96+
pkgs_path = pkgdir(Pkg, "test", "test_packages")
97+
# Precompile a diverse set of test packages
98+
# Check all test packages occasionally if anything has been missed
99+
# test_packages = readdir(pkgs_path)
100+
test_packages = (
101+
"ActiveProjectInTestSubgraph",
102+
"BasicSandbox",
103+
"DependsOnExample",
104+
"PackageWithDependency",
105+
"SameNameDifferentUUID",
106+
"SimplePackage",
107+
"BasicCompat",
108+
"PackageWithDependency",
109+
"SameNameDifferentUUID",
110+
"SimplePackage",
111+
joinpath("ExtensionExamples", "HasExtensions.jl")
112+
)
113+
for test_package in test_packages
114+
Pkg.activate(joinpath(pkgs_path, test_package))
115+
end
116+
Pkg.activate(; temp=true)
117+
Pkg.activate()
118+
Pkg.activate("TestPkg.jl")
96119
end
97120
Pkg.precompile()
98121
try Base.rm(tmp; recursive=true)

0 commit comments

Comments
 (0)