Hi all,
I’m using julia 1.5.3 on Ubuntu.
I have a bunch of modules with dependencies, and a one line script that just has a using
statement for these modules (no other code in the script).
I first precompile all my modules using this code in a loop:
using Pkg
Pkg.activate("<module name>")
Pkg.precompile()
Pkg.activate()
(I’ve also tried using Base.compilecache
instead of Pkg.precompile
with the same results.)
After the precompile, I try to load my one line script into julia:
julia init-pkgs.jl
Julia recompiles all the modules again. Subsequent runs of this code do not result in recompiles.
I don’t quite understand why this happens. Is Pkg.precompile / Base.compilecache
insufficient for compiling the code? Is there anything else I can do ahead of time so that running my script does not cause a recompile?
Thanks,
Philip