Skip to content

Commit

Permalink
fix list in message
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Feb 9, 2024
1 parent 0f075f1 commit 80aef1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,8 @@ function run_extension_callbacks(pkgid::PkgId)
for extid in extids
if in(extid.id, precompilation_stack) && !isprecompiled(extid.id)
@debug """
Dependency cycle detected in extension precompilation: $(join(precompilation_stack, " > ")) > $(extid.id.name)
$(extid.id) will not be loaded here.
Dependency cycle detected in extension precompilation: $(precompilation_stack_list()) > $(extid.id.name)
$(extid.id.name) will not be loaded here.
"""
continue
end
Expand Down Expand Up @@ -2525,14 +2525,14 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, output_o::
end

const precompilation_stack = Vector{PkgId}()
precompilation_stack_list() = join(map(p->p.name, precompilation_stack), " > ")
# Helpful for debugging when precompilation is unexpectedly nested.
# Enable with `JULIA_DEBUG=nested_precomp`. Note that it expected to be nested in classical code-load precompilation
# TODO: Add detection if extension precompilation is nested and error / return early?
function track_nested_precomp(pkgs::Vector{PkgId})
append!(precompilation_stack, pkgs)
if length(precompilation_stack) > 1
list() = join(map(p->p.name, precompilation_stack), " > ")
@debug "Nested precompilation: $(list())" _group=:nested_precomp
@debug "Nested precompilation: $(precompilation_stack_list())" _group=:nested_precomp
end
end

Expand Down

0 comments on commit 80aef1e

Please sign in to comment.