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 @@ -1793,7 +1793,7 @@ get_compiletime_preferences(::Nothing) = String[]
1793
1793
1794
1794
# returns true if it "cachefile.ji" is stale relative to "modpath.jl"
1795
1795
# otherwise returns the list of dependencies to also check
1796
- function stale_cachefile (modpath:: String , cachefile:: String )
1796
+ function stale_cachefile (modpath:: String , cachefile:: String ; ignore_loaded = false )
1797
1797
io = open (cachefile, " r" )
1798
1798
try
1799
1799
if ! isvalid_cache_header (io)
@@ -1814,11 +1814,15 @@ function stale_cachefile(modpath::String, cachefile::String)
1814
1814
M = root_module (req_key)
1815
1815
if PkgId (M) == req_key && module_build_id (M) === req_build_id
1816
1816
depmods[i] = M
1817
+ elseif ignore_loaded
1818
+ # Used by Pkg.precompile given that there it's ok to precompile different versions of loaded packages
1819
+ @goto locate_branch
1817
1820
else
1818
1821
@debug " Rejecting cache file $cachefile because module $req_key is already loaded and incompatible."
1819
1822
return true # Won't be able to fulfill dependency
1820
1823
end
1821
1824
else
1825
+ @label locate_branch
1822
1826
path = locate_package (req_key)
1823
1827
get! (PkgOrigin, pkgorigins, req_key). path = path
1824
1828
if path === nothing
You can’t perform that action at this time.
0 commit comments