Skip to content

Commit

Permalink
precompilepkgs: don't confuse single package in project with requesti…
Browse files Browse the repository at this point in the history
…ng 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.
  • Loading branch information
IanButterworth authored Mar 26, 2024
1 parent 64de065 commit 653c0ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/precompilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ function precompilepkgs(pkgs::Vector{String}=String[];
manifest::Bool=false,)

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

time_start = time_ns()

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

0 comments on commit 653c0ae

Please sign in to comment.