Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3864,10 +3864,17 @@ end

# now check if this file's content hash has changed relative to its source files
if stalecheck
if !samefile(includes[1].filename, modpath) && !samefile(fixup_stdlib_path(includes[1].filename), modpath)
@debug "Rejecting cache file $cachefile because it is for file $(includes[1].filename) not file $modpath"
record_reason(reasons, "wrong source")
return true # cache file was compiled from a different path
if !samefile(includes[1].filename, modpath)
# In certain cases the path rewritten by `fixup_stdlib_path` may
# point to an unreadable directory, make sure we can `stat` the
# file before comparing it with `modpath`.
stdlib_path = fixup_stdlib_path(includes[1].filename)
if !(isreadable(stdlib_path) && samefile(stdlib_path, modpath))
!samefile(fixup_stdlib_path(includes[1].filename), modpath)
@debug "Rejecting cache file $cachefile because it is for file $(includes[1].filename) not file $modpath"
record_reason(reasons, "wrong source")
return true # cache file was compiled from a different path
end
end
for (modkey, req_modkey) in requires
# verify that `require(modkey, name(req_modkey))` ==> `req_modkey`
Expand Down