@@ -910,7 +910,7 @@ function make_pkgspec(man, uuid)
910910end
911911
912912precompile (; kwargs... ) = precompile (Context (); kwargs... )
913- function precompile (ctx:: Context ; internal_call:: Bool = false , kwargs... )
913+ function precompile (ctx:: Context ; internal_call:: Bool = false , strict :: Bool = false , kwargs... )
914914 Context! (ctx; kwargs... )
915915 instantiate (ctx; allow_autoprecomp= false , kwargs... )
916916 time_start = time_ns ()
@@ -1144,7 +1144,7 @@ function precompile(ctx::Context; internal_call::Bool=false, kwargs...)
11441144 end
11451145 catch err
11461146 if err isa ErrorException
1147- failed_deps[pkg] = is_direct_dep ? String (take! (iob)) : " "
1147+ failed_deps[pkg] = (strict || is_direct_dep) ? String (take! (iob)) : " "
11481148 ! fancyprint && lock (print_lock) do
11491149 println (io, string (color_string (" ✗ " , Base. error_color ()), name))
11501150 end
@@ -1213,15 +1213,16 @@ function precompile(ctx::Context; internal_call::Bool=false, kwargs...)
12131213 err_str = " "
12141214 n_direct_errs = 0
12151215 for (dep, err) in failed_deps
1216- if dep in direct_deps
1216+ if strict || ( dep in direct_deps)
12171217 err_str *= " \n " * " $dep " * " \n\n " * err * (n_direct_errs > 0 ? " \n " : " " )
12181218 n_direct_errs += 1
12191219 end
12201220 end
12211221 if err_str != " "
12221222 println (io, " " )
12231223 plural = n_direct_errs == 1 ? " y" : " ies"
1224- pkgerror (" The following $( n_direct_errs) direct dependenc$(plural) failed to precompile:\n $(err_str[1 : end - 1 ]) " )
1224+ direct = strict ? " " : " direct "
1225+ pkgerror (" The following $n_direct_errs $(direct) dependenc$(plural) failed to precompile:\n $(err_str[1 : end - 1 ]) " )
12251226 end
12261227 end
12271228 end
0 commit comments