Skip to content

Commit 10466c3

Browse files
fix for Pkg
1 parent b621e03 commit 10466c3

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

base/precompilation.jl

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,24 @@ end
338338
const Config = Pair{Cmd, Base.CacheFlags}
339339
const PkgConfig = Tuple{Base.PkgId,Config}
340340

341-
function precompilepkgs(pkgs::Vector{String}=String[]; internal_call::Bool=false,
342-
strict::Bool=false, warn_loaded = true, timing::Bool = false,
343-
_from_loading::Bool=false, configs::Union{Config,Vector{Config}}=(``=>Base.CacheFlags()),
344-
io::IO=stderr)
345-
time_start = time_ns()
341+
function precompilepkgs(pkgs::Vector{String}=String[];
342+
internal_call::Bool=false,
343+
strict::Bool = false,
344+
warn_loaded::Bool = true,
345+
timing::Bool = false,
346+
_from_loading::Bool=false,
347+
configs::Union{Config,Vector{Config}}=(``=>Base.CacheFlags()),
348+
io::IO=stderr,
349+
flags_cacheflags=nothing)
350+
351+
if flags_cacheflags !== nothing
352+
# TODO: Remove `flags_cacheflags` once Pkg moves to the renamed kwarg `configs`
353+
configs = flags_cacheflags
354+
end
346355
configs = configs isa Config ? [configs] : configs
347356

357+
time_start = time_ns()
358+
348359
env = ExplicitEnv()
349360

350361
# Windows sometimes hits a ReadOnlyMemoryError, so we halve the default number of tasks. Issue #2323

0 commit comments

Comments
 (0)