Skip to content

Commit 416fd0c

Browse files
vchuravytkelman
authored andcommitted
don't use isdefined in stale_cachefile
`isdefined` will immediatly resolve the binding. Since we are only trying to skip the path lookup the weaker version `isbindingresolved` is enough. `isbindingresolved` is also used for this purpose in `read_verify_mod_list` in `src/dump.c`. (cherry picked from commit 6c92f26) ref #21539
1 parent 88ab843 commit 416fd0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/loading.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ function stale_cachefile(modpath::String, cachefile::String)
670670
if mod == :Main || mod == :Core || mod == :Base
671671
continue
672672
# Module is already loaded
673-
elseif isdefined(Main, mod)
673+
elseif isbindingresolved(Main, mod)
674674
continue
675675
end
676676
name = string(mod)

0 commit comments

Comments
 (0)