Subject: [PATCH 1/5] base: Compile CHECKOUT in the fiber.

From: Clément Lassieur <[email-masked]>
Date: Wed, 11 Jul 2018 01:02:43 +0200

Because it may take time and thus prevent PROCESS-SPECS to run every INTERVAL
seconds.

* src/cuirass/base.scm (process-specs): move the COMPILE invocation inside
SPAWN-FIBER's thunk.  Add log message.
---
 src/cuirass/base.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index 9985fd6..de54f72 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2016, 2017 Mathieu Lirzin <[email-masked]>
 ;;; Copyright © 2017 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2017 Ricardo Wurmus <[email-masked]>
+;;; Copyright © 2018 Clément Lassieur <[email-masked]>
 ;;;
 ;;; This file is part of Cuirass.
 ;;;
@@ -631,12 +632,11 @@ procedure is meant to be called at startup."
                ;; Immediately mark COMMIT as being processed so we don't spawn
                ;; a concurrent evaluation of that same commit.
                (db-add-stamp db spec commit)
-
-               (when compile?
-                 (non-blocking (compile checkout)))
-
                (spawn-fiber
                 (lambda ()
+                  (when compile?
+                    (log-message "compiling '~a' with commit ~s" name commit)
+                    (non-blocking (compile checkout)))
                   (guard (c ((evaluation-error? c)
                              (log-message "failed to evaluate spec '~s'"
                                           (evaluation-error-spec-name c))
-- 
2.18.0