@@ -165,19 +165,16 @@ end
165165# This has to be done after the packages have been downloaded
166166# since we need access to the Project file to read the information
167167# about extensions
168- function fixup_ext! (env, pkgs )
169- for pkg in pkgs
168+ function fixup_ext! (env:: EnvCache )
169+ for pkg in values (env . manifest)
170170 v = joinpath (source_path (env. manifest_file, pkg), " Project.toml" )
171- if haskey (env. manifest, pkg. uuid)
172- entry = env. manifest[pkg. uuid]
173- if isfile (v)
174- p = Types. read_project (v)
175- entry. weakdeps = p. weakdeps
176- entry. exts = p. exts
177- for (name, _) in p. weakdeps
178- if ! haskey (p. deps, name)
179- delete! (entry. deps, name)
180- end
171+ if isfile (v)
172+ p = Types. read_project (v)
173+ pkg. weakdeps = p. weakdeps
174+ pkg. exts = p. exts
175+ for (name, _) in p. weakdeps
176+ if ! haskey (p. deps, name)
177+ delete! (pkg. deps, name)
181178 end
182179 end
183180 end
@@ -1388,7 +1385,7 @@ function add(ctx::Context, pkgs::Vector{PackageSpec}, new_git=Set{UUID}();
13881385 pkgs, deps_map = _resolve (ctx. io, ctx. env, ctx. registries, pkgs, preserve, ctx. julia_version)
13891386 update_manifest! (ctx. env, pkgs, deps_map, ctx. julia_version)
13901387 new_apply = download_source (ctx)
1391- fixup_ext! (ctx. env, pkgs )
1388+ fixup_ext! (ctx. env)
13921389
13931390 # After downloading resolutionary packages, search for (Julia)Artifacts.toml files
13941391 # and ensure they are all downloaded and unpacked as well:
@@ -1411,7 +1408,7 @@ function develop(ctx::Context, pkgs::Vector{PackageSpec}, new_git::Set{UUID};
14111408 pkgs, deps_map = _resolve (ctx. io, ctx. env, ctx. registries, pkgs, preserve, ctx. julia_version)
14121409 update_manifest! (ctx. env, pkgs, deps_map, ctx. julia_version)
14131410 new_apply = download_source (ctx)
1414- fixup_ext! (ctx. env, pkgs )
1411+ fixup_ext! (ctx. env)
14151412 download_artifacts (ctx. env; platform= platform, julia_version= ctx. julia_version, io= ctx. io)
14161413 write_env (ctx. env) # write env before building
14171414 show_update (ctx. env, ctx. registries; io= ctx. io)
@@ -1539,7 +1536,7 @@ function up(ctx::Context, pkgs::Vector{PackageSpec}, level::UpgradeLevel;
15391536 end
15401537 update_manifest! (ctx. env, pkgs, deps_map, ctx. julia_version)
15411538 new_apply = download_source (ctx)
1542- fixup_ext! (ctx. env, pkgs )
1539+ fixup_ext! (ctx. env)
15431540 download_artifacts (ctx. env, julia_version= ctx. julia_version, io= ctx. io)
15441541 write_env (ctx. env; skip_writing_project) # write env before building
15451542 show_update (ctx. env, ctx. registries; io= ctx. io, hidden_upgrades_info = true )
@@ -1585,7 +1582,7 @@ function pin(ctx::Context, pkgs::Vector{PackageSpec})
15851582
15861583 update_manifest! (ctx. env, pkgs, deps_map, ctx. julia_version)
15871584 new = download_source (ctx)
1588- fixup_ext! (ctx. env, pkgs )
1585+ fixup_ext! (ctx. env)
15891586 download_artifacts (ctx. env; julia_version= ctx. julia_version, io= ctx. io)
15901587 write_env (ctx. env) # write env before building
15911588 show_update (ctx. env, ctx. registries; io= ctx. io)
@@ -1629,7 +1626,7 @@ function free(ctx::Context, pkgs::Vector{PackageSpec}; err_if_free=true)
16291626
16301627 update_manifest! (ctx. env, pkgs, deps_map, ctx. julia_version)
16311628 new = download_source (ctx)
1632- fixup_ext! (ctx. env, pkgs )
1629+ fixup_ext! (ctx. env)
16331630 download_artifacts (ctx. env, io= ctx. io)
16341631 write_env (ctx. env) # write env before building
16351632 show_update (ctx. env, ctx. registries; io= ctx. io)
0 commit comments