unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Guix Devel" <guix-devel@gnu.org>,
	"Nicolò Balzarotti" <anothersms@gmail.com>
Subject: Julia precompiled twice?
Date: Wed, 24 Mar 2021 02:15:33 +0100	[thread overview]
Message-ID: <86h7l1ic7e.fsf@gmail.com> (raw)

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


                 reply	other threads:[~2021-03-24  1:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h7l1ic7e.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=anothersms@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).