guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: ui: Better workaround for lack of '%fresh-auto-compile' on 2.2.3.


From: Ludovic Courtès
Subject: 01/01: ui: Better workaround for lack of '%fresh-auto-compile' on 2.2.3.
Date: Mon, 5 Mar 2018 04:56:22 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit f44c7aaccd1942b8bf7916e4c8bb0f8f1abfcb58
Author: Ludovic Courtès <address@hidden>
Date:   Mon Mar 5 10:52:32 2018 +0100

    ui: Better workaround for lack of '%fresh-auto-compile' on 2.2.3.
    
    Fixes <https://bugs.gnu.org/29226> for the most part.
    
    * guix/ui.scm (load*): Add call to 'compile-file' on 2.2.3.
---
 guix/ui.scm | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index fb2380b..221bb82 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -52,6 +52,7 @@
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (ice-9 regex)
+  #:autoload   (system base compile) (compile-file)
   #:autoload   (system repl repl)  (start-repl)
   #:autoload   (system repl debug) (make-debug stack->vector)
   #:use-module (texinfo)
@@ -186,8 +187,8 @@ messages."
 
   (define (error-string frame args)
     (call-with-output-string
-     (lambda (port)
-       (apply display-error frame port (cdr args)))))
+      (lambda (port)
+        (apply display-error frame port (cdr args)))))
 
   (define tag
     (make-prompt-tag "user-code"))
@@ -199,11 +200,13 @@ messages."
       ;; In 2.2.3, the bogus answer to <https://bugs.gnu.org/29226> was to
       ;; ignore all available .go, not just those from ~/.cache, which in turn
       ;; meant that we had to rebuild *everything*.  Since this is too costly,
-      ;; we have to turn auto '%fresh-auto-compile' with that version, at the
-      ;; risk of getting ABI breakage in the user's config file.  See
-      ;; <https://bugs.gnu.org/29881>.
-      (unless (string=? (version) "2.2.3")
-        (set! %fresh-auto-compile #t))
+      ;; we have to turn off '%fresh-auto-compile' with that version, so to
+      ;; avoid ABI breakage in the user's config file, we explicitly compile
+      ;; it (the problem remains if the user's config is spread on several
+      ;; modules.)  See <https://bugs.gnu.org/29881>.
+      (if (string=? (version) "2.2.3")
+          (compile-file file #:env user-module)
+          (set! %fresh-auto-compile #t))
 
       (set! %load-should-auto-compile #t)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]