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.
master
Ludovic Courtès 2018-03-05 10:52:32 +01:00
parent f285b17b35
commit f44c7aaccd
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 10 additions and 7 deletions

View File

@ -52,6 +52,7 @@
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:use-module (ice-9 format) #:use-module (ice-9 format)
#:use-module (ice-9 regex) #:use-module (ice-9 regex)
#:autoload (system base compile) (compile-file)
#:autoload (system repl repl) (start-repl) #:autoload (system repl repl) (start-repl)
#:autoload (system repl debug) (make-debug stack->vector) #:autoload (system repl debug) (make-debug stack->vector)
#:use-module (texinfo) #:use-module (texinfo)
@ -199,10 +200,12 @@ messages."
;; In 2.2.3, the bogus answer to <https://bugs.gnu.org/29226> was to ;; 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 ;; ignore all available .go, not just those from ~/.cache, which in turn
;; meant that we had to rebuild *everything*. Since this is too costly, ;; 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 ;; we have to turn off '%fresh-auto-compile' with that version, so to
;; risk of getting ABI breakage in the user's config file. See ;; avoid ABI breakage in the user's config file, we explicitly compile
;; <https://bugs.gnu.org/29881>. ;; it (the problem remains if the user's config is spread on several
(unless (string=? (version) "2.2.3") ;; 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! %fresh-auto-compile #t))
(set! %load-should-auto-compile #t) (set! %load-should-auto-compile #t)