Skip to content

Commit e7622dc

Browse files
IanButterworthfredrikekre
authored andcommitted
precompile: handle when source file is missing (#2332)
(cherry picked from commit aa1332c, PR #2332)
1 parent 32c5a0f commit e7622dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/API.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,11 @@ function precompile(ctx::Context; internal_call::Bool=false, kwargs...)
10831083
for (pkg, deps) in depsmap # precompilation loop
10841084
paths = Base.find_all_in_cache_path(pkg)
10851085
sourcepath = Base.locate_package(pkg)
1086-
sourcepath === nothing && continue
1086+
if sourcepath === nothing
1087+
failed_deps[pkg] = "Error: Missing source file for $(pkg)"
1088+
notify(was_processed[pkg])
1089+
continue
1090+
end
10871091
# Heuristic for when precompilation is disabled
10881092
if occursin(r"\b__precompile__\(\s*false\s*\)", read(sourcepath, String))
10891093
notify(was_processed[pkg])

0 commit comments

Comments
 (0)