@@ -2501,7 +2501,7 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, output_o::
2501
2501
# write data over stdin to avoid the (unlikely) case of exceeding max command line size
2502
2502
write (io. in, """
2503
2503
empty!(Base.EXT_DORMITORY) # If we have a custom sysimage with `EXT_DORMITORY` prepopulated
2504
- Base.track_nested_precomp($(repr (vcat (Base. precompilation_stack, pkg. name ))) )
2504
+ Base.track_nested_precomp($(repr_pkgid_vec (vcat (Base. precompilation_stack, pkg))) )
2505
2505
Base.precompiling_extension = $(loading_extension)
2506
2506
Base.include_package_for_output($(pkg_str (pkg)) , $(repr (abspath (input))) , $(repr (depot_path)) , $(repr (dl_load_path)) ,
2507
2507
$(repr (load_path)) , $deps , $(repr (source_path (nothing ))) )
@@ -2510,14 +2510,25 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, output_o::
2510
2510
return io
2511
2511
end
2512
2512
2513
- const precompilation_stack = Vector {String} ()
2513
+ # TODO : remove once https://github.com/JuliaLang/julia/pull/52795 is figured out
2514
+ function repr_pkgid (pkg:: PkgId )
2515
+ if pkg. uuid === nothing
2516
+ return " $(PkgId) ($(repr (pkg. name)) )"
2517
+ else
2518
+ return " $(PkgId) ($(repr (pkg. uuid)) , $(repr (pkg. name)) )"
2519
+ end
2520
+ end
2521
+ repr_pkgid_vec (pkgs:: Vector{PkgId} ) = " $(PkgId) [" * join (repr_pkgid .(pkgs), " ," ) * " ]"
2522
+
2523
+ const precompilation_stack = Vector {PkgId} ()
2514
2524
# Helpful for debugging when precompilation is unexpectedly nested.
2515
2525
# Enable with `JULIA_DEBUG=nested_precomp`. Note that it expected to be nested in classical code-load precompilation
2516
2526
# TODO : Add detection if extension precompilation is nested and error / return early?
2517
- function track_nested_precomp (pkg_names:: Vector{String} )
2518
- append! (Base. precompilation_stack, pkg_names)
2519
- if length (Base. precompilation_stack) > 1
2520
- @debug " Nested precompilation: $(join (Base. precompilation_stack, " > " )) " _group= :nested_precomp
2527
+ function track_nested_precomp (pkgs:: Vector{PkgId} )
2528
+ append! (precompilation_stack, pkgs)
2529
+ if length (precompilation_stack) > 1
2530
+ list () = join (map (p-> p. name, precompilation_stack), " > " )
2531
+ @debug " Nested precompilation: $(list ()) " _group= :nested_precomp
2521
2532
end
2522
2533
end
2523
2534
0 commit comments