From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#27284: [PATCH 4/4] pull: Reload modules before doing anything else. Date: Mon, 11 Dec 2017 11:52:53 +0100 Message-ID: <20171211105253.9670-5-ludo@gnu.org> References: <87h8tnz1dx.fsf@gnu.org> <20171211105253.9670-1-ludo@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOLin-000525-FH for bug-guix@gnu.org; Mon, 11 Dec 2017 05:54:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOLil-0000iQ-Lb for bug-guix@gnu.org; Mon, 11 Dec 2017 05:54:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eOLil-0000iL-Ig for bug-guix@gnu.org; Mon, 11 Dec 2017 05:54:03 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20171211105253.9670-1-ludo@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 27284@debbugs.gnu.org * build-aux/build-self.scm (build): Uncomment call to 'reload-guix'. Set '%fresh-auto-compile' --- build-aux/build-self.scm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index d9d926367..04185e0a5 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -21,6 +21,7 @@ #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) #:use-module (ice-9 match) + #:use-module (system base compile) #:export (build)) ;;; Commentary: @@ -82,23 +83,26 @@ Guix." #:rest rest) "Return a derivation that unpacks SOURCE into STORE and compiles Scheme files." + + ;; Pre-load the compiler modules so we don't end up rebuilding them due to + ;; %FRESH-AUTO-COMPILE. + (compile #t) + ;; Start by jumping into the target Guix so that we have access to the ;; latest packages and APIs. ;; ;; Our checkout in the store has mtime set to the epoch, and thus .go ;; files look newer, even though they may not correspond. - (parameterize* ((%load-should-auto-compile #f) - (%fresh-auto-compile #f) + (parameterize* ((%load-should-auto-compile #t) + (%fresh-auto-compile #t) ;; Work around . (%load-compiled-path (pure-load-compiled-path))) - ;; FIXME: This is currently too expensive notably because it involves - ;; compiling a number of the big package files such as perl.scm, which - ;; takes lots of time and memory as of Guile 2.2.2. - ;; - ;; (let ((reload-guix (module-ref (resolve-interface '(guix self)) - ;; 'reload-guix))) - ;; (reload-guix)) ;cross fingers! + ;; Hide auto-compilation messages. + (parameterize ((current-warning-port (%make-void-port "w"))) + (let ((reload-guix (module-ref (resolve-interface '(guix self)) + 'reload-guix))) + (reload-guix))) ;cross fingers! (let ((guix-derivation (module-ref (resolve-interface '(guix self)) 'guix-derivation))) -- 2.15.1