Skip to content

Commit e17a2a2

Browse files
committed
fixup Pkg3 broadcasting over iterables
1 parent 7674aca commit e17a2a2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

stdlib/Pkg3/src/Operations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ function with_dependencies_loadable_at_toplevel(f, mainctx::Context, pkg::Packag
657657
need_to_resolve = false
658658

659659
if Types.is_project(localctx.env, pkg)
660-
delete!.(localctx.env.project, ["name", "uuid", "version"])
660+
foreach(k->delete!(localctx.env.project, k), ("name", "uuid", "version"))
661661
localctx.env.project["deps"][pkg.name] = string(pkg.uuid)
662662
localctx.env.manifest[pkg.name] = [Dict(
663663
"deps" => mainctx.env.project["deps"],

stdlib/Pkg3/src/Types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ mutable struct EnvCache
482482
git = ispath(joinpath(project_dir, ".git")) ? LibGit2.GitRepo(project_dir) : nothing
483483

484484
project = read_project(project_file)
485-
if any(haskey.(project, ["name", "uuid", "version"]))
485+
if any(k->haskey(project, k), ("name", "uuid", "version"))
486486
project_package = PackageSpec(
487487
get(project, "name", ""),
488488
UUID(get(project, "uuid", 0)),

stdlib/Pkg3/src/resolve/FieldValues.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,7 @@ function secondmax(f::Field, msk::BitVector = trues(length(f)))
105105
return m2 - m
106106
end
107107

108+
# Support broadcasting like a scalar by default
109+
Base.Broadcast.broadcastable(a::FieldValue) = Ref(a)
110+
108111
end

0 commit comments

Comments
 (0)