Skip to content

Commit 653c0ae

Browse files
precompilepkgs: don't confuse single package in project with requesting single package (#53865)
Followup to #53653 Separate from #53862 because this one is just broken on master Without this if you precompile a project with a single dep it thought the user was calling `precompile Dep` or `using Dep` so went into live print mode, which is confusing.
1 parent 64de065 commit 653c0ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/precompilation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ function precompilepkgs(pkgs::Vector{String}=String[];
361361
manifest::Bool=false,)
362362

363363
configs = configs isa Config ? [configs] : configs
364+
requested_pkgs = copy(pkgs) # for understanding user intent
364365

365366
time_start = time_ns()
366367

@@ -748,7 +749,7 @@ function precompilepkgs(pkgs::Vector{String}=String[];
748749
for (pkg, deps) in depsmap
749750
cachepaths = Base.find_all_in_cache_path(pkg)
750751
sourcepath = Base.locate_package(pkg)
751-
single_requested_pkg = length(pkgs) == 1 && only(pkgs) == pkg.name
752+
single_requested_pkg = length(requested_pkgs) == 1 && only(requested_pkgs) == pkg.name
752753
for config in configs
753754
pkg_config = (pkg, config)
754755
if sourcepath === nothing

0 commit comments

Comments
 (0)