Skip to content

Commit

Permalink
Base.Precompilation.ExplicitEnv: handle type instability better in …
Browse files Browse the repository at this point in the history
…constructor (#57599)

Avoiding the converting `setindex!` should hopefully diminish
unwarranted invalidation of user code.

(cherry picked from commit 1e03ed6)
  • Loading branch information
nsajko authored and KristofferC committed Mar 3, 2025
1 parent 66085c5 commit e661b5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/precompilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,16 @@ function ExplicitEnv(envpath::String=Base.active_project())

# Extensions
deps_pkg = get(Dict{String, Any}, pkg_info, "extensions")::Dict{String, Any}
deps_pkg_concrete = Dict{String, Vector{String}}()
for (ext, triggers) in deps_pkg
if triggers isa String
triggers = [triggers]
else
triggers = triggers::Vector{String}
end
deps_pkg[ext] = triggers
deps_pkg_concrete[ext] = triggers
end
extensions[m_uuid] = deps_pkg
extensions[m_uuid] = deps_pkg_concrete

# Determine strategy to find package
lookup_strat = begin
Expand Down

0 comments on commit e661b5f

Please sign in to comment.