[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Julia precompiled twice?
From: |
zimoun |
Subject: |
Julia precompiled twice? |
Date: |
Wed, 24 Mar 2021 02:15:33 +0100 |
Hi,
The (guix build julia-build-system) contains this:
--8<---------------cut here---------------start------------->8---
;; Actual precompilation:
(invoke-julia
;; When using Julia as a user, Julia writes precompile cache to the first
;; entry of the DEPOT_PATH list (by default, the home dir). We want to
;; write it to the store, so let's push the store path as the first
;; element of DEPOT_PATH. Once the cache file exists, this hack is not
;; needed anymore (like in the check phase). If the user install new
;; packages, those will be installed and precompiled in the home dir.
(string-append "pushfirst!(DEPOT_PATH, pop!(DEPOT_PATH)); using "
package)))
--8<---------------cut here---------------end--------------->8---
i.e., after the ’check’ phase, the Julia files are precompiled…
--8<---------------cut here---------------start------------->8---
$ guix build julia-adapt --no-grafts --check
[…]
phase `check' succeeded after 15.1 seconds
starting phase `precompile'
phase `precompile' succeeded after 1.5 seconds
[…]
--8<---------------cut here---------------end--------------->8---
…but then at the first ’using <pkg>’, it is recompiled again:
--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc julia julia-adapt -- julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.5.3 (2020-11-09)
_/ |\__'_|_|_|\__'_| |
|__/ |
julia> using Adapt
[ Info: Precompiling Adapt [79e6a3ab-5dfb-504d-930d-738a2a938a0e]
julia>
--8<---------------cut here---------------end--------------->8---
Note that it is not then recompiled because the precompiled cache is
contained in “$HOME/.julia/compiled”; created by the REPL call.
The question is: is it possible to precompile at build-time? And
distribute via substitutes these precompiled files? Especially
regarding the current non-reproducibility status [1,2] of Julia in
general.
Or what is the purpose of this precompilation at build time?
1: <http://issues.guix.gnu.org/issue/22304>
2: <http://issues.guix.gnu.org/issue/47354>
Cheers,
simon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Julia precompiled twice?,
zimoun <=