Skip to content

Commit 36fdfa1

Browse files
IanButterworthKristofferC
authored andcommitted
don't build and precompile an uninstantiated environment twice (#2625)
(cherry picked from commit 5754202)
1 parent 8d1f80c commit 36fdfa1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/API.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ end
13211321
instantiate(; kwargs...) = instantiate(Context(); kwargs...)
13221322
function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
13231323
update_registry::Bool=true, verbose::Bool=false,
1324-
platform::AbstractPlatform=HostPlatform(), allow_autoprecomp::Bool=true, kwargs...)
1324+
platform::AbstractPlatform=HostPlatform(), allow_build::Bool=true, allow_autoprecomp::Bool=true, kwargs...)
13251325
Context!(ctx; kwargs...)
13261326
if !isfile(ctx.env.project_file) && isfile(ctx.env.manifest_file)
13271327
_manifest = Pkg.Types.read_manifest(ctx.env.manifest_file)
@@ -1411,7 +1411,7 @@ function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
14111411
end
14121412
Operations.download_artifacts(ctx, art_pkgs; platform, verbose, io=ctx.io)
14131413
# Run build scripts
1414-
Operations.build_versions(ctx, union(UUID[pkg.uuid for pkg in new_apply], new_git); verbose)
1414+
allow_build && Operations.build_versions(ctx, union(UUID[pkg.uuid for pkg in new_apply], new_git); verbose)
14151415

14161416
allow_autoprecomp && Pkg._auto_precompile(ctx)
14171417
end

src/Operations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ end
903903

904904
function build(ctx::Context, pkgs::Vector{PackageSpec}, verbose::Bool)
905905
if any_package_not_installed(ctx) || !isfile(ctx.env.manifest_file)
906-
Pkg.instantiate(ctx)
906+
Pkg.instantiate(ctx, allow_build=false, allow_autoprecomp=false)
907907
end
908908
uuids = UUID[]
909909
_get_deps!(ctx, pkgs, uuids)

0 commit comments

Comments
 (0)