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[]
1814
1814
1815
1815
# returns true if it "cachefile.ji" is stale relative to "modpath.jl"
1816
1816
# 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 )
1818
1818
io = open (cachefile, " r" )
1819
1819
try
1820
1820
if ! isvalid_cache_header (io)
@@ -1835,11 +1835,15 @@ function stale_cachefile(modpath::String, cachefile::String)
1835
1835
M = root_module (req_key)
1836
1836
if PkgId (M) == req_key && module_build_id (M) === req_build_id
1837
1837
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
1838
1841
else
1839
1842
@debug " Rejecting cache file $cachefile because module $req_key is already loaded and incompatible."
1840
1843
return true # Won't be able to fulfill dependency
1841
1844
end
1842
1845
else
1846
+ @label locate_branch
1843
1847
path = locate_package (req_key)
1844
1848
get! (PkgOrigin, pkgorigins, req_key). path = path
1845
1849
if path === nothing
You can’t perform that action at this time.
0 commit comments