Skip to content

Commit 4641d14

Browse files
don't use pkgimages if any includes fall in tracked path
1 parent 9e75161 commit 4641d14

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

base/loading.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3275,6 +3275,11 @@ end
32753275
return true
32763276
end
32773277
end
3278+
tracked_path = if JLOptions().tracked_path == NULL
3279+
""
3280+
else
3281+
unsafe_string(JLOptions().tracked_path)
3282+
end
32783283
for chi in includes
32793284
f, fsize_req, hash_req, ftime_req = chi.filename, chi.fsize, chi.hash, chi.mtime
32803285
if startswith(f, "@depot/")
@@ -3289,6 +3294,14 @@ end
32893294
@debug "Rejecting stale cache file $cachefile because file $f does not exist"
32903295
return true
32913296
end
3297+
if JLOptions().use_pkgimages != 0 && JLOptions().code_coverage == 3 && occursin(tracked_path, f)
3298+
@debug "Rejecting cache file $cachefile because included file $f is being tracked by --code-coverage=@$tracked_path"
3299+
return true
3300+
end
3301+
if JLOptions().use_pkgimages != 0 && JLOptions().malloc_log == 3 && occursin(tracked_path, f)
3302+
@debug "Rejecting cache file $cachefile because included file $f is being tracked by --track-allocation=@$tracked_path"
3303+
return true
3304+
end
32923305
if ftime_req >= 0.0
32933306
# this is an include_dependency for which we only recorded the mtime
32943307
ftime = mtime(f)

0 commit comments

Comments
 (0)