Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Feb 27, 2024
1 parent 5c7709a commit 77b4e4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,7 @@ end

# Unused
const PKG_PRECOMPILE_HOOK = Ref{Function}()
disable_parallel_precompile::Bool = false

# Returns `nothing` or the new(ish) module
function _require(pkg::PkgId, env=nothing)
Expand Down Expand Up @@ -2305,7 +2306,8 @@ function _require(pkg::PkgId, env=nothing)
if JLOptions().use_compiled_modules == 1
if !generating_output(#=incremental=#false)
project = active_project()
if !parallel_precompile_attempted && @isdefined(PrecompilePkgs) && project !== nothing && isfile(project) && project_file_manifest_path(project) !== nothing
if !generating_output() && !parallel_precompile_attempted && !disable_parallel_precompile && @isdefined(PrecompilePkgs) && project !== nothing &&
isfile(project) && project_file_manifest_path(project) !== nothing
parallel_precompile_attempted = true
unlock(require_lock)
try
Expand Down
4 changes: 0 additions & 4 deletions base/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,6 @@ function precompilepkgs(pkgs::Vector{String}=String[]; internal_call::Bool=false

env = ExplicitEnv()

if isempty(pkgs)
pkgs = collect(keys(env.project_deps))
end

# Windows sometimes hits a ReadOnlyMemoryError, so we halve the default number of tasks. Issue #2323
# TODO: Investigate why this happens in windows and restore the full task limit
default_num_tasks = Sys.iswindows() ? div(Sys.CPU_THREADS::Int, 2) + 1 : Sys.CPU_THREADS::Int + 1
Expand Down

0 comments on commit 77b4e4d

Please sign in to comment.