Skip to content

Commit

Permalink
gracefully fall back to non pid locked precompilation if FileWatching…
Browse files Browse the repository at this point in the history
… is not present in sysimage
  • Loading branch information
KristofferC committed Nov 15, 2024
1 parent 62756be commit f182f59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/precompilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,12 @@ end

# Can be merged with `maybe_cachefile_lock` in loading?
function precompile_pkgs_maybe_cachefile_lock(f, io::IO, print_lock::ReentrantLock, fancyprint::Bool, pkg_config, pkgspidlocked, hascolor)
FileWatching = get(Base.loaded_modules, Base.PkgId(Base.UUID("7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"), "FileWatching"), nothing)
if FileWatching === nothing
return f()
end
pkg, config = pkg_config
flags, cacheflags = config
FileWatching = Base.loaded_modules[Base.PkgId(Base.UUID("7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"), "FileWatching")]
stale_age = Base.compilecache_pidlock_stale_age
pidfile = Base.compilecache_pidfile_path(pkg, flags=cacheflags)
cachefile = FileWatching.trymkpidlock(f, pidfile; stale_age)
Expand Down

0 comments on commit f182f59

Please sign in to comment.