diff --git a/base/precompilation.jl b/base/precompilation.jl index edd8824ff8d686..6c54ec445728c5 100644 --- a/base/precompilation.jl +++ b/base/precompilation.jl @@ -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)