Skip to content

Commit

Permalink
don't use pkgimages if any includes fall in tracked path
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 14, 2023
1 parent 0371bf4 commit 50eadde
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,11 @@ end
return true
end
end
tracked_path = if JLOptions().tracked_path == NULL
""
else
unsafe_string(JLOptions().tracked_path)
end
for chi in includes
f, ftime_req = chi.filename, chi.mtime
if !isfile(f)
Expand All @@ -2733,6 +2738,14 @@ end
@debug "Rejecting stale cache file $cachefile because file $f does not exist"
return true
end
if JLOptions().use_pkgimages != 0 && JLOptions().code_coverage == 3 && occursin(tracked_path, f)
@debug "Rejecting cache file $cachefile because included file $f is being tracked by --code-coverage=@$tracked_path"
return true
end
if JLOptions().use_pkgimages != 0 && JLOptions().malloc_log == 3 && occursin(tracked_path, f)
@debug "Rejecting cache file $cachefile because included file $f is being tracked by --track-allocation=@$tracked_path"
return true
end
ftime = mtime(f)
is_stale = ( ftime != ftime_req ) &&
( ftime != floor(ftime_req) ) && # Issue #13606, PR #13613: compensate for Docker images rounding mtimes
Expand Down

0 comments on commit 50eadde

Please sign in to comment.