Skip to content

Commit

Permalink
Precompile Pkg.activate() (#3540)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
  • Loading branch information
mkitti and IanButterworth committed Nov 1, 2023
1 parent e43501b commit 4b8e390
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,29 @@ function pkg_precompile()
Pkg.REPLMode.try_prompt_pkg_add(Symbol[:notapackage])
Pkg.update(; update_registry=false)
Pkg.status()
pkgs_path = pkgdir(Pkg, "test", "test_packages")
# Precompile a diverse set of test packages
# Check all test packages occasionally if anything has been missed
# test_packages = readdir(pkgs_path)
test_packages = (
"ActiveProjectInTestSubgraph",
"BasicSandbox",
"DependsOnExample",
"PackageWithDependency",
"SameNameDifferentUUID",
"SimplePackage",
"BasicCompat",
"PackageWithDependency",
"SameNameDifferentUUID",
"SimplePackage",
joinpath("ExtensionExamples", "HasExtensions.jl")
)
for test_package in test_packages
Pkg.activate(joinpath(pkgs_path, test_package))
end
Pkg.activate(; temp=true)
Pkg.activate()
Pkg.activate("TestPkg.jl")
end
Pkg.precompile()
try Base.rm(tmp; recursive=true)
Expand Down

0 comments on commit 4b8e390

Please sign in to comment.