Skip to content

Commit

Permalink
Suggestion: Use different precompilation cache path for different sys…
Browse files Browse the repository at this point in the history
…tem 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
  • Loading branch information
tkf authored and KristofferC committed Oct 29, 2019
1 parent 49fb792 commit 962634d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 962634d

Please sign in to comment.