diff options
author | Christopher Baines <mail@cbaines.net> | 2024-04-23 10:41:59 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-04-23 10:41:59 +0100 |
commit | 0df0c1a6b85f1f84affdd21b3b6b14fb62f7820e (patch) | |
tree | 761a790fe52e61c486e5c8eb2b931e48f01db744 | |
parent | 0590b34115a0a181ade33b0fae2e7512b6d7c6e4 (diff) | |
download | build-coordinator-master.tar build-coordinator-master.tar.gz |
I'm not sure quite what's changed, but it seems like the way the
formatter is being called has changed in a backwards incompatible way.
To maintain compatability with both older and newer versions of
guile-lib, accept the formatter being called with extra arguments, and
just look at the first three.
-rw-r--r-- | guix-build-coordinator/agent.scm | 11 | ||||
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm index 8144947..0520da2 100644 --- a/guix-build-coordinator/agent.scm +++ b/guix-build-coordinator/agent.scm @@ -82,11 +82,14 @@ (define port-log (make <port-log> #:port (current-output-port) #:formatter - (lambda (lvl time str) + ;; In guile-lib v0.2.8 onwards, the formatter is + ;; called with more arguments + (lambda args ; lvl, time, str (format #f "~a (~5a): ~a~%" - (strftime "%F %H:%M:%S" (localtime time)) - lvl - str)))) + (strftime "%F %H:%M:%S" (localtime + (second args))) + (first args) + (third args))))) (define metrics-enabled? (and (not (string-null? metrics-file)) diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index 3830d88..fcb0000 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -394,11 +394,14 @@ (port-log (make <custom-port-log> #:port (current-output-port) #:formatter - (lambda (lvl time str) + ;; In guile-lib v0.2.8 onwards, the formatter is + ;; called with more arguments + (lambda args ; lvl, time, str (format #f "~a (~5a): ~a~%" - (strftime "%F %H:%M:%S" (localtime time)) - lvl - str)))) + (strftime "%F %H:%M:%S" (localtime + (second args))) + (first args) + (third args))))) (build-coordinator (make-build-coordinator-record datastore hooks |