diff --git a/base/loading.jl b/base/loading.jl index 3f5ba46906e3e..c7397df8f4515 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1280,17 +1280,21 @@ function _include_from_serialized(pkg::PkgId, path::String, ocachepath::Union{No sv = try if ocachepath !== nothing @debug "Loading object cache file $ocachepath for $(repr("text/plain", pkg))" - ccall(:jl_restore_package_image_from_file, Ref{SimpleVector}, (Cstring, Any, Cint, Cstring, Cint), + ccall(:jl_restore_package_image_from_file, Any, (Cstring, Any, Cint, Cstring, Cint), ocachepath, depmods, #=completeinfo=#false, pkg.name, ignore_native) else @debug "Loading cache file $path for $(repr("text/plain", pkg))" - ccall(:jl_restore_incremental, Ref{SimpleVector}, (Cstring, Any, Cint, Cstring), + ccall(:jl_restore_incremental, Any, (Cstring, Any, Cint, Cstring), path, depmods, #=completeinfo=#false, pkg.name) end finally lock(require_lock) end + if isa(sv, Exception) + return sv + end + sv = sv::SimpleVector edges = sv[3]::Vector{Any} ext_edges = sv[4]::Union{Nothing,Vector{Any}} extext_methods = sv[5]::Vector{Any}