From 6859d68579e7970daf00720901cf487563dca0da Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Tue, 12 Mar 2024 07:26:08 -0400 Subject: [PATCH] precompile: update kwargs (#3838) --- src/API.jl | 5 +++-- src/Operations.jl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/API.jl b/src/API.jl index 88e33204fb..212d2c3de1 100644 --- a/src/API.jl +++ b/src/API.jl @@ -1131,7 +1131,8 @@ end function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool=false, strict::Bool=false, warn_loaded = true, already_instantiated = false, timing::Bool = false, - _from_loading::Bool=false, flags_cacheflags::Pair{Cmd, Base.CacheFlags}=(``=>Base.CacheFlags()), kwargs...) + _from_loading::Bool=false, configs::Union{Base.Precompilation.Config,Vector{Base.Precompilation.Config}}=(``=>Base.CacheFlags()), + kwargs...) Context!(ctx; kwargs...) if !already_instantiated instantiate(ctx; allow_autoprecomp=false, kwargs...) @@ -1154,7 +1155,7 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool activate(dirname(ctx.env.project_file)) do pkgs_name = String[pkg.name for pkg in pkgs] - return Base.Precompilation.precompilepkgs(pkgs_name; internal_call, strict, warn_loaded, timing, _from_loading, flags_cacheflags, io) + return Base.Precompilation.precompilepkgs(pkgs_name; internal_call, strict, warn_loaded, timing, _from_loading, configs, io) end end diff --git a/src/Operations.jl b/src/Operations.jl index 4d1127ee95..7e837c74c8 100644 --- a/src/Operations.jl +++ b/src/Operations.jl @@ -2046,7 +2046,7 @@ function test(ctx::Context, pkgs::Vector{PackageSpec}; if should_autoprecompile() cacheflags = Base.CacheFlags(parse(UInt8, read(`$(Base.julia_cmd()) $(flags) --eval 'show(ccall(:jl_cache_flags, UInt8, ()))'`, String))) Pkg.activate(sandbox_ctx.env.project_file; #=io=devnull=#) do - Pkg.precompile(sandbox_ctx; io=sandbox_ctx.io, flags_cacheflags = flags => cacheflags) + Pkg.precompile(sandbox_ctx; io=sandbox_ctx.io, configs = flags => cacheflags) end end