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 @@ -1712,7 +1712,7 @@ get_compiletime_preferences(::Nothing) = String[]
1712
1712
1713
1713
# returns true if it "cachefile.ji" is stale relative to "modpath.jl"
1714
1714
# otherwise returns the list of dependencies to also check
1715
- function stale_cachefile (modpath:: String , cachefile:: String )
1715
+ function stale_cachefile (modpath:: String , cachefile:: String ; ignore_loaded = false )
1716
1716
io = open (cachefile, " r" )
1717
1717
try
1718
1718
if ! isvalid_cache_header (io)
@@ -1733,11 +1733,15 @@ function stale_cachefile(modpath::String, cachefile::String)
1733
1733
M = root_module (req_key)
1734
1734
if PkgId (M) == req_key && module_build_id (M) === req_build_id
1735
1735
depmods[i] = M
1736
+ elseif ignore_loaded
1737
+ # Used by Pkg.precompile given that there it's ok to precompile different versions of loaded packages
1738
+ @goto locate_branch
1736
1739
else
1737
1740
@debug " Rejecting cache file $cachefile because module $req_key is already loaded and incompatible."
1738
1741
return true # Won't be able to fulfill dependency
1739
1742
end
1740
1743
else
1744
+ @label locate_branch
1741
1745
path = locate_package (req_key)
1742
1746
get! (PkgOrigin, pkgorigins, req_key). path = path
1743
1747
if path === nothing
You can’t perform that action at this time.
0 commit comments