Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Warning: The call to compilecache failed to create a usable precompiled cache file..." when sharing depot across Julia versions #3629

Open
topolarity opened this issue Sep 21, 2023 · 1 comment
Labels

Comments

@topolarity
Copy link
Member

topolarity commented Sep 21, 2023

MWE:

$ JULIA_DEPOT_PATH=tmp_depot julia-15f34aa649 -e "using Pkg; Pkg.add(\"Distributions\")"
$ JULIA_DEPOT_PATH=tmp_depot julia-2cee483bce -e "using Pkg; Pkg.add(\"Distributions\")" --project=tmp_project 
...
┌ Distributions [31c24e10-a181-5473-b8eb-7969acd0382f]
│  ┌ Warning: The call to compilecache failed to create a usable precompiled cache file for StatsBase [2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91]
│  │   exception = Required dependency Statistics [10745b16-79ce-11e8-11f9-7d13ad32a3b2] failed to load from a cache file.
│  └ @ Base loading.jl:1986

julia-15f34aa649 is a newer Julia v1.11 from after JuliaLang/julia#46501, while julia-2cee483bce is from before.

I was able to bypass the issue by (a) deleting the git-tree-sha1 entry in the Statistics entry of the Manifest, or (b) JULIA_DEPOT_PATH=tmp_depot julia-2cee483bce -e "using Pkg; Pkg.update()"

Neither of those should be necessary though. julia-2cee483bce is fully capable of loading either the old built-in Statistics (v1.9.0) or the new liberated version (v1.11.0)

@topolarity topolarity added the bug label Sep 21, 2023
@topolarity
Copy link
Member Author

The challenging part of the user experience is that ] resolve and ] update both succeed and report no errors, despite the problem with the stacked Manifest:

$ JULIA_DEPOT_PATH=tmp_depot julia-2cee483bce --project=tmp_project
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-DEV.116 (2023-07-18)
 _/ |\__'_|_|_|\__'_|  |  Commit 2cee483bce (64 days old master)
|__/                   |

(tmp_project) pkg> resolve
  No Changes to `~/repos/DAECompiler.jl/tmp_project/Project.toml`
  No Changes to `~/repos/DAECompiler.jl/tmp_project/Manifest.toml`

(tmp_project) pkg> update
    Updating registry at `tmp_depot/registries/General.toml`
  No Changes to `~/repos/DAECompiler.jl/tmp_project/Project.toml`
  No Changes to `~/repos/DAECompiler.jl/tmp_project/Manifest.toml`
Precompiling project...
  ? Distributions
  3 dependencies successfully precompiled in 17 seconds. 36 already precompiled.
  1 dependency failed but may be precompilable after restarting julia
  2 dependencies had warnings during precompilation:
┌ Distributions [31c24e10-a181-5473-b8eb-7969acd0382f]
│  ┌ Warning: The call to compilecache failed to create a usable precompiled cache file for StatsBase [2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91]
│  │   exception = Required dependency Statistics [10745b16-79ce-11e8-11f9-7d13ad32a3b2] failed to load from a cache file.
│  └ @ Base loading.jl:1986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant