@@ -463,10 +463,10 @@ function precompilepkgs(pkgs::Vector{String}=String[];
463463 was_recompiled = Dict {PkgConfig,Bool} ()
464464 for config in configs
465465 for pkgid in keys (depsmap)
466- dep_config = (pkgid, config)
467- started[dep_config ] = false
468- was_processed[dep_config ] = Base. Event ()
469- was_recompiled[dep_config ] = false
466+ pkg_config = (pkgid, config)
467+ started[pkg_config ] = false
468+ was_processed[pkg_config ] = Base. Event ()
469+ was_recompiled[pkg_config ] = false
470470 end
471471 end
472472 @debug " precompile: signalling initialized"
@@ -501,9 +501,9 @@ function precompilepkgs(pkgs::Vector{String}=String[];
501501 for pkg in keys (depsmap)
502502 if scan_pkg! (pkg, depsmap)
503503 push! (circular_deps, pkg)
504- for dep_config in keys (was_processed)
504+ for pkg_config in keys (was_processed)
505505 # notify all to allow skipping
506- dep_config [1 ] == pkg && notify (was_processed[dep_config ])
506+ pkg_config [1 ] == pkg && notify (was_processed[pkg_config ])
507507 end
508508 end
509509 end
@@ -551,8 +551,9 @@ function precompilepkgs(pkgs::Vector{String}=String[];
551551 else
552552 target = " project"
553553 end
554- if length (configs) > 1 || ! isempty (only (configs)[1 ]) # if multiple configs or only one is not default
555- target *= " for $(length (configs)) compilation configurations..."
554+ nconfig = length (configs)
555+ if nconfig > 1
556+ target *= " for $nconfig compilation configurations..."
556557 else
557558 target *= " ..."
558559 end
@@ -671,35 +672,35 @@ function precompilepkgs(pkgs::Vector{String}=String[];
671672 str = sprint (io -> show_progress (io, bar; termwidth, carriagereturn= false ); context= io)
672673 print (iostr, Base. _truncate_at_width_or_chars (true , str, termwidth), " \n " )
673674 end
674- for dep_config in pkg_queue_show
675- dep, config = dep_config
675+ for pkg_config in pkg_queue_show
676+ dep, config = pkg_config
676677 loaded = warn_loaded && haskey (Base. loaded_modules, dep)
677678 _name = haskey (exts, dep) ? string (exts[dep], " → " , dep. name) : dep. name
678679 name = dep in direct_deps ? _name : string (color_string (_name, :light_black ))
679- if length (configs) > 1
680- config_str = isempty (config[ 1 ]) ? " " : " $(join (config[1 ], " " )) "
680+ if ! isempty (config[ 1 ])
681+ config_str = " $(join (config[1 ], " " )) "
681682 name *= color_string (" $(config_str) " , :light_black )
682683 end
683- line = if dep_config in precomperr_deps
684+ line = if pkg_config in precomperr_deps
684685 string (color_string (" ? " , Base. warn_color ()), name)
685- elseif haskey (failed_deps, dep_config )
686+ elseif haskey (failed_deps, pkg_config )
686687 string (color_string (" ✗ " , Base. error_color ()), name)
687- elseif was_recompiled[dep_config ]
688+ elseif was_recompiled[pkg_config ]
688689 ! loaded && interrupted_or_done. set && continue
689690 loaded || @async begin # keep successful deps visible for short period
690691 sleep (1 );
691- filter! (! isequal (dep_config ), pkg_queue)
692+ filter! (! isequal (pkg_config ), pkg_queue)
692693 end
693694 string (color_string (" ✓ " , loaded ? Base. warn_color () : :green ), name)
694- elseif started[dep_config ]
695+ elseif started[pkg_config ]
695696 # Offset each spinner animation using the first character in the package name as the seed.
696697 # If not offset, on larger terminal fonts it looks odd that they all sync-up
697698 anim_char = anim_chars[(i + Int (dep. name[1 ])) % length (anim_chars) + 1 ]
698699 anim_char_colored = dep in direct_deps ? anim_char : color_string (anim_char, :light_black )
699- waiting = if haskey (pkgspidlocked, dep_config )
700- who_has_lock = pkgspidlocked[dep_config ]
700+ waiting = if haskey (pkgspidlocked, pkg_config )
701+ who_has_lock = pkgspidlocked[pkg_config ]
701702 color_string (" Being precompiled by $(who_has_lock) " , Base. info_color ())
702- elseif dep_config in taskwaiting
703+ elseif pkg_config in taskwaiting
703704 color_string (" Waiting for background task / IO / timer. Interrupt to inspect" , Base. warn_color ())
704705 else
705706 " "
@@ -768,8 +769,8 @@ function precompilepkgs(pkgs::Vector{String}=String[];
768769
769770 _name = haskey (exts, pkg) ? string (exts[pkg], " → " , pkg. name) : pkg. name
770771 name = is_direct_dep ? _name : string (color_string (_name, :light_black ))
771- if length (configs) > 1
772- config_str = isempty (config[ 1 ]) ? " " : " $(join (config[ 1 ] , " " )) "
772+ if ! isempty (flags)
773+ config_str = " $(join (flags , " " )) "
773774 name *= color_string (" $(config_str) " , :light_black )
774775 end
775776 ! fancyprint && lock (print_lock) do
@@ -808,7 +809,7 @@ function precompilepkgs(pkgs::Vector{String}=String[];
808809 close (std_pipe. in) # close pipe to end the std output monitor
809810 wait (t_monitor)
810811 if err isa ErrorException || (err isa ArgumentError && startswith (err. msg, " Invalid header in cache file" ))
811- failed_deps[dep_config ] = (strict || is_direct_dep) ? string (sprint (showerror, err), " \n " , strip (get (std_outputs, pkg, " " ))) : " "
812+ failed_deps[pkg_config ] = (strict || is_direct_dep) ? string (sprint (showerror, err), " \n " , strip (get (std_outputs, pkg, " " ))) : " "
812813 delete! (std_outputs, pkg_config) # so it's not shown as warnings, given error report
813814 ! fancyprint && lock (print_lock) do
814815 println (io, " " ^ 9 , color_string (" ✗ " , Base. error_color ()), name)
@@ -906,9 +907,11 @@ function precompilepkgs(pkgs::Vector{String}=String[];
906907 quick_exit && return
907908 err_str = " "
908909 n_direct_errs = 0
909- for (dep, err) in failed_deps
910+ for (pkg_config, err) in failed_deps
911+ dep, config = pkg_config
910912 if strict || (dep in direct_deps)
911- err_str = string (err_str, " \n $dep \n\n $err " , (n_direct_errs > 0 ? " \n " : " " ))
913+ config_str = isempty (config[1 ]) ? " " : " $(join (config[1 ], " " )) "
914+ err_str = string (err_str, " \n $(dep. name) $config_str \n\n $err " , (n_direct_errs > 0 ? " \n " : " " ))
912915 n_direct_errs += 1
913916 end
914917 end
0 commit comments