File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1814,7 +1814,7 @@ get_compiletime_preferences(::Nothing) = String[]
18141814
18151815# returns true if it "cachefile.ji" is stale relative to "modpath.jl"
18161816# otherwise returns the list of dependencies to also check
1817- function stale_cachefile (modpath:: String , cachefile:: String )
1817+ function stale_cachefile (modpath:: String , cachefile:: String ; ignore_loaded = false )
18181818 io = open (cachefile, " r" )
18191819 try
18201820 if ! isvalid_cache_header (io)
@@ -1835,11 +1835,15 @@ function stale_cachefile(modpath::String, cachefile::String)
18351835 M = root_module (req_key)
18361836 if PkgId (M) == req_key && module_build_id (M) === req_build_id
18371837 depmods[i] = M
1838+ elseif ignore_loaded
1839+ # Used by Pkg.precompile given that there it's ok to precompile different versions of loaded packages
1840+ @goto locate_branch
18381841 else
18391842 @debug " Rejecting cache file $cachefile because module $req_key is already loaded and incompatible."
18401843 return true # Won't be able to fulfill dependency
18411844 end
18421845 else
1846+ @label locate_branch
18431847 path = locate_package (req_key)
18441848 get! (PkgOrigin, pkgorigins, req_key). path = path
18451849 if path === nothing
You can’t perform that action at this time.
0 commit comments