I'm developing a package and every time I launch a new REPL and run this code using Revise;using Pkg; Pkg.activate(".");using MyDevPkg
it spends about 10 minutes precompiling. This is an unsustainable way of working and very frustrating. To test, I've just let it do all the precompilation, then killed that REPL, started a new one and ran the same lines -> it's precompiling again.
Is there something I'm missing here? I thought precompilation should be handled correctly automatically?
I'm on Julia v1.10.7, Revise v3.6.4
hmm it also appears to happen with registered packages, it had just finished all the precompilation but after it just finished precompiling mine, the using DifferentialEquations
call has also started to precompile again (after just having finished it before closing down the REPL). Did I misconfigure something?
japhir said:
I thought precompilation should be handled correctly automatically?
That should be the case. Do you see warnings about precompilation being broken (e.g. because of methods overwritten)?
I now see a lot of warnings that I did not notice earlier, but I'm not sure what has caused these to appear. They are all of the form:
[ Info: Precompiling GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]
┌ Warning: Module GeometryBasics with build ID ffffffff-ffff-ffff-0000-1f8ad8b3710e is missing from the cache.
│ This may mean GeometryBasics [5c1252a2-5f33-56bf-86c9-59e7332b4326] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2011
[ Info: Skipping precompilation since precompile(false). Importing GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a].
my startup.jl is very simple:
try
using Revise
catch e
@warn "Error initializing Revise"
end
if haskey(ENV, "INSIDE_EMACS")
ENV["JULIA_EDITOR"] = "emacsclient"
end
and I launch the REPL with julia-repl-mode in emacs, with only this option: (setq julia-repl-switches "--threads 4")
Try to delete the precompile cache in your depot compile/v1.10
OK I have deleted everything in the folder ~/.julia/compiled/v1.10
and re-ran the code that triggers precompilation (the using lines in my script). This works and I don't see any warnings during precompilation.
However, after killing the REPL and restarting, it starts to precompile my dev package as well as some of its dependencies (74 dependencies successfully precompiled in 215 seconds. 641 already precompiled.
) again?!
Any advice would be appreciated! I have installed julia via juliaup on Arch Linux
Last updated: Dec 28 2024 at 04:38 UTC