Skip to content

Commit e618369

Browse files
authored
precompilepkgs: package in boths deps and weakdeps are in fact only weak (#53649)
Missed when porting from Pkg. Fixes JuliaLang/Pkg.jl#3834.
1 parent 78351b5 commit e618369

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

base/precompilation.jl

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ struct ExplicitEnv
2626
end
2727

2828
function ExplicitEnv(envpath::String=Base.active_project())
29+
if !isfile(envpath)
30+
error("expected a project file at $(repr(envpath))")
31+
end
2932
envpath = abspath(envpath)
3033
project_d = parsed_toml(envpath)
3134

@@ -51,6 +54,11 @@ function ExplicitEnv(envpath::String=Base.active_project())
5154
end
5255
end
5356

57+
# A package in both deps and weakdeps is in fact only a weakdep
58+
for (name, _) in project_weakdeps
59+
delete!(project_deps, name)
60+
end
61+
5462
project_extensions = Dict{String, Vector{UUID}}()
5563
# Collect all extensions of the project
5664
for (name, triggers::Union{String, Vector{String}}) in get(Dict{String, Any}, project_d, "extensions")::Dict{String, Any}

0 commit comments

Comments
 (0)