From 962634d263b491eb6390536d07bb8dce9a4a0639 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Tue, 29 Oct 2019 01:25:33 -0700 Subject: [PATCH] Suggestion: Use different precompilation cache path for different system image (#29914) * Include path to system image in package_slug * Include path to julia binary in package_slug * Mix `image_file` and `julia_bin` into project slug --- base/loading.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/loading.jl b/base/loading.jl index a4a40300c97c6..a6af16d6281ea 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1191,7 +1191,10 @@ function compilecache_path(pkg::PkgId)::String if pkg.uuid === nothing abspath(cachepath, entryfile) * ".ji" else - project_precompile_slug = slug(_crc32c(something(Base.active_project(), "")), 5) + crc = _crc32c(something(Base.active_project(), "")) + crc = _crc32c(unsafe_string(JLOptions().image_file), crc) + crc = _crc32c(unsafe_string(JLOptions().julia_bin), crc) + project_precompile_slug = slug(crc, 5) abspath(cachepath, string(entryfile, "_", project_precompile_slug, ".ji")) end end