@@ -2460,28 +2460,27 @@ function _require(pkg::PkgId, env=nothing)
24602460 end
24612461 # spawn off a new incremental pre-compile task for recursive `require` calls
24622462 loaded = maybe_cachefile_lock (pkg, path) do
2463- # double-check now that we have lock
2463+ # double-check the search now that we have lock
24642464 m = _require_search_from_serialized (pkg, path, UInt128 (0 ), true )
24652465 m isa Module && return m
24662466 return compilecache (pkg, path; reasons)
24672467 end
24682468 loaded isa Module && return loaded
2469- cachefile = loaded
2470- if isnothing (cachefile) # maybe_cachefile_lock returns nothing if it had to wait for another process
2469+ if isnothing (loaded) # maybe_cachefile_lock returns nothing if it had to wait for another process
24712470 @goto load_from_cache # the new cachefile will have the newest mtime so will come first in the search
2472- elseif isa (cachefile , Exception)
2473- if precompilableerror (cachefile )
2471+ elseif isa (loaded , Exception)
2472+ if precompilableerror (loaded )
24742473 verbosity = isinteractive () ? CoreLogging. Info : CoreLogging. Debug
2475- @logmsg verbosity " Skipping precompilation due to precompilable error. Importing $(repr (" text/plain" , pkg)) ." exception= m
2474+ @logmsg verbosity " Skipping precompilation due to precompilable error. Importing $(repr (" text/plain" , pkg)) ." exception= loaded
24762475 else
2477- @warn " The call to compilecache failed to create a usable precompiled cache file for $(repr (" text/plain" , pkg)) " exception= m
2476+ @warn " The call to compilecache failed to create a usable precompiled cache file for $(repr (" text/plain" , pkg)) " exception= loaded
24782477 end
24792478 # fall-through to loading the file locally if not incremental
24802479 else
2481- cachefile, ocachefile = cachefile :: Tuple{String, Union{Nothing, String}}
2480+ cachefile, ocachefile = loaded :: Tuple{String, Union{Nothing, String}}
24822481 loaded = _tryrequire_from_serialized (pkg, cachefile, ocachefile)
24832482 if ! isa (loaded, Module)
2484- @warn " The call to compilecache failed to create a usable precompiled cache file for $(repr (" text/plain" , pkg)) " exception= m
2483+ @warn " The call to compilecache failed to create a usable precompiled cache file for $(repr (" text/plain" , pkg)) " exception= loaded
24852484 else
24862485 return loaded
24872486 end
0 commit comments