unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Julia precompiled twice?
@ 2021-03-24  1:15 zimoun
  0 siblings, 0 replies; only message in thread
From: zimoun @ 2021-03-24  1:15 UTC (permalink / raw)
  To: Guix Devel, Nicolò Balzarotti

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-24  1:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  1:15 Julia precompiled twice? zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).