Skip to content

Commit 4f2886c

Browse files
IanButterworthKristofferC
authored andcommitted
don't build and precompile an uninstantiated environment twice (#2625)
(cherry picked from commit 5754202)
1 parent 0b80574 commit 4f2886c

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
@@ -1408,7 +1408,7 @@ end
14081408
instantiate(; kwargs...) = instantiate(Context(); kwargs...)
14091409
function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
14101410
update_registry::Bool=true, verbose::Bool=false,
1411-
platform::AbstractPlatform=HostPlatform(), allow_autoprecomp::Bool=true, kwargs...)
1411+
platform::AbstractPlatform=HostPlatform(), allow_build::Bool=true, allow_autoprecomp::Bool=true, kwargs...)
14121412
Context!(ctx; kwargs...)
14131413
if Registry.download_default_registries(ctx.io)
14141414
copy!(ctx.registries, Registry.reachable_registries())
@@ -1498,7 +1498,7 @@ function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
14981498
# Install all artifacts
14991499
Operations.download_artifacts(ctx.env; platform=platform, verbose=verbose)
15001500
# Run build scripts
1501-
Operations.build_versions(ctx, union(new_apply, new_git); verbose=verbose)
1501+
allow_build && Operations.build_versions(ctx, union(new_apply, new_git); verbose=verbose)
15021502

15031503
allow_autoprecomp && Pkg._auto_precompile(ctx)
15041504
end

src/Operations.jl

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

826826
function build(ctx::Context, uuids::Set{UUID}, verbose::Bool)
827827
if any_package_not_installed(ctx.env.manifest) || !isfile(ctx.env.manifest_file)
828-
Pkg.instantiate(ctx)
828+
Pkg.instantiate(ctx, allow_build = false, allow_autoprecomp = false)
829829
end
830830
all_uuids = get_deps(ctx.env, uuids)
831831
build_versions(ctx, all_uuids; verbose)

0 commit comments

Comments
 (0)