Skip to content

Commit

Permalink
Merge pull request #50232 from JuliaLang/sf/dont_precompile_multiple_…
Browse files Browse the repository at this point in the history
…modules_into_a_ji_file

Throw precompilation error if dependency load failure during incremental precompilation
  • Loading branch information
staticfloat authored Jun 20, 2023
2 parents a8ef873 + 9032926 commit 4195a0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ function _require(pkg::PkgId, env=nothing)
else
@warn "The call to compilecache failed to create a usable precompiled cache file for $pkg" exception=m
end
# fall-through to loading the file locally
# fall-through to loading the file locally if not incremental
else
cachefile, ocachefile = cachefile::Tuple{String, Union{Nothing, String}}
m = _tryrequire_from_serialized(pkg, cachefile, ocachefile)
Expand All @@ -1929,6 +1929,10 @@ function _require(pkg::PkgId, env=nothing)
return m
end
end
if JLOptions().incremental != 0
# during incremental precompilation, this should be fail-fast
throw(PrecompilableError())
end
end
end

Expand Down

0 comments on commit 4195a0e

Please sign in to comment.