Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove recompilation dependency check in Pkg.precompile #3696

Merged
merged 2 commits into from Nov 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/API.jl
Expand Up @@ -1079,11 +1079,11 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
strict::Bool=false, warn_loaded = true, already_instantiated = false, timing::Bool = false,
_from_loading::Bool=false, kwargs...)
Context!(ctx; kwargs...)
if !already_instantiated
if !already_instantiated
instantiate(ctx; allow_autoprecomp=false, kwargs...)
@debug "precompile: instantiated"
end

time_start = time_ns()

# Windows sometimes hits a ReadOnlyMemoryError, so we halve the default number of tasks. Issue #2323
Expand Down Expand Up @@ -1497,10 +1497,8 @@ function precompile(ctx::Context, pkgs::Vector{PackageSpec}; internal_call::Bool
queued = precomp_queued(pkgspec)

circular = pkg in circular_deps
# skip stale checking and force compilation if any dep was recompiled in this session
any_dep_recompiled = any(map(dep->was_recompiled[dep], deps))
is_stale = true
if !circular && (queued || any_dep_recompiled || (!suspended && (is_stale = !Base.isprecompiled(pkg; ignore_loaded=true, stale_cache, cachepaths, sourcepath))))
if !circular && (queued || (!suspended && (is_stale = !Base.isprecompiled(pkg; ignore_loaded=true, stale_cache, cachepaths, sourcepath))))
Base.acquire(parallel_limiter)
is_direct_dep = pkg in direct_deps

Expand Down