Skip to content

Commit 5e8fb67

Browse files
use julia_version kwarg rather than ctx
1 parent c925b84 commit 5e8fb67

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Prefix.jl

+4-6
Original file line numberDiff line numberDiff line change
@@ -669,18 +669,16 @@ function setup_dependencies(prefix::Prefix,
669669
deps_project = joinpath(prefix, triplet(platform), ".project")
670670
Pkg.activate(deps_project) do
671671
# Update registry first, in case the jll packages we're looking for have just been registered/updated
672-
ctx = Pkg.Types.Context(;julia_version)
673672
outs = verbose ? stdout : devnull
674673
update_registry(outs)
675674

676-
# Add all dependencies. Note: Pkg.add(ctx, deps) modifies in-place `deps` without
677-
# notice. We need to `deepcopy` the argument to prevent it from modying our
678-
# dependencies from under our feet: <https://github.com/JuliaLang/Pkg.jl/issues/3112>.
679-
Pkg_add(ctx, deepcopy(dependencies); platform=platform, io=outs)
675+
# Add all dependencies.
676+
Pkg_add(dependencies; platform=platform, io=outs, julia_version=julia_version)
680677

681678
# Ony Julia v1.6, `Pkg.add()` doesn't mutate `dependencies`, so we can't use the `UUID`
682679
# that was found during resolution there. Instead, we'll make use of `ctx.env` to figure
683680
# out the UUIDs of all our packages.
681+
ctx = Pkg.Types.Context()
684682
dependency_uuids = Set([uuid for (uuid, pkg) in ctx.env.manifest if pkg.name dependencies_names])
685683

686684
# Some JLLs are also standard libraries that may be present in the manifest because
@@ -718,7 +716,7 @@ function setup_dependencies(prefix::Prefix,
718716

719717
# Re-install stdlib dependencies, but this time with `julia_version = nothing`
720718
if !isempty(stdlib_pkgspecs)
721-
Pkg_add(ctx, stdlib_pkgspecs; io=outs, julia_version=nothing)
719+
Pkg_add(stdlib_pkgspecs; io=outs, julia_version=nothing)
722720
end
723721

724722
# Load their Artifacts.toml files

0 commit comments

Comments
 (0)