[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Wed, 25 Oct 2023 18:01:53 -0400 (EDT) |
branch: master
commit 505ce3f8dcf5630e82271024c929b47520e9919f
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Oct 25 19:09:40 2023 +0200
Switch from SRFI-11 to SRFI-71.
* src/cuirass/base.scm, src/cuirass/http.scm,
src/cuirass/scripts/remote-worker.scm, src/cuirass/zabbix.scm: Use
SRFI-71 instead of SRFI-11.
---
src/cuirass/base.scm | 17 +++++++----------
src/cuirass/http.scm | 11 +++++------
src/cuirass/scripts/remote-worker.scm | 5 ++---
src/cuirass/zabbix.scm | 13 ++++++-------
4 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index e830684..f4d821c 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -51,11 +51,11 @@
#:autoload (ice-9 threads) (current-processor-count)
#:use-module (ice-9 vlist)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-11)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
+ #:use-module (srfi srfi-71)
#:use-module (rnrs bytevectors)
#:export (;; Procedures.
call-with-time-display
@@ -261,10 +261,9 @@ items."
(count total))
(if (zero? count)
(log-info "done with ~a derivations" total)
- (let*-values (((batch rest)
- (if (> count max-batch-size)
- (split-at drv max-batch-size)
- (values drv '()))))
+ (let ((batch rest (if (> count max-batch-size)
+ (split-at drv max-batch-size)
+ (values drv '()))))
(guard (c ((store-protocol-error? c)
(log-error "batch of builds (partially) failed: \
~a (status: ~a)"
@@ -272,8 +271,7 @@ items."
(store-protocol-error-status c))))
(log-info "building batch of ~a derivations (~a/~a)"
max-batch-size (- total count) total)
- (let-values (((port finish)
- (build-derivations& store batch)))
+ (let ((port finish (build-derivations& store batch)))
(process-build-log port
(lambda (event state)
;; Catch any errors so we can keep reading
@@ -348,9 +346,8 @@ This procedure is meant to be called at startup."
started) by sending them to BUILDER."
(with-store store
(log-info "retrieving list of pending builds...")
- (let*-values (((valid stale)
- (partition (cut valid-path? store <>)
- (db-get-pending-derivations))))
+ (let ((valid stale (partition (cut valid-path? store <>)
+ (db-get-pending-derivations))))
;; We cannot restart builds listed in STALE, so mark them as canceled.
(log-info "canceling ~a stale builds" (length stale))
(for-each (lambda (drv)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 1ea32ff..2fdb8c5 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -35,8 +35,8 @@
#:use-module (cuirass specification)
#:use-module (cuirass zabbix)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-71)
#:use-module (ice-9 binary-ports)
#:use-module (ice-9 match)
#:use-module (ice-9 textual-ports)
@@ -1335,13 +1335,12 @@ passed, only display JOBS targeting this SYSTEM."
(let* ((impl (lookup-server-impl 'fiberized))
(server (open-server impl `(#:host ,address #:port ,port))))
(let loop ()
- (let-values (((client request body)
- (read-client impl server)))
+ (let ((client request body (read-client impl server)))
;; Spawn a fiber to handle REQUEST and reply to CLIENT.
(spawn-fiber
(lambda ()
- (let-values (((response body state)
- (handle-request (cut url-handler bridge <...>)
- request body '())))
+ (let ((response body state
+ (handle-request (cut url-handler bridge <...>)
+ request body '())))
(write-client impl server client response body)))))
(loop))))))
diff --git a/src/cuirass/scripts/remote-worker.scm
b/src/cuirass/scripts/remote-worker.scm
index d22b6df..b37bc05 100644
--- a/src/cuirass/scripts/remote-worker.scm
+++ b/src/cuirass/scripts/remote-worker.scm
@@ -52,11 +52,11 @@
#:use-module (rnrs bytevectors)
#:use-module (web uri)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-11)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-37)
+ #:use-module (srfi srfi-71)
#:use-module (ice-9 atomic)
#:use-module (ice-9 match)
#:use-module (ice-9 threads)
@@ -234,8 +234,7 @@ still be substituted."
(log-info (G_ "~a: derivation `~a' build failed: ~a")
name drv (store-protocol-error-message c))
(reply (build-failed-message drv local-publish-url))))
- (let-values (((port finish)
- (build-derivations& store (list drv))))
+ (let ((port finish (build-derivations& store (list drv))))
(catch #t
(lambda ()
(send-log address log-port drv port))
diff --git a/src/cuirass/zabbix.scm b/src/cuirass/zabbix.scm
index b6b1586..e66b4f8 100644
--- a/src/cuirass/zabbix.scm
+++ b/src/cuirass/zabbix.scm
@@ -24,7 +24,7 @@
#:use-module (web response)
#:use-module (json)
#:use-module (rnrs bytevectors)
- #:use-module (srfi srfi-11)
+ #:use-module (srfi srfi-71)
#:use-module (ice-9 match)
#:export (zabbix-api-version
zabbix-available?
@@ -44,12 +44,11 @@
(let ((headers `((User-Agent . "Cuirass")
(Accept . "application/json")
(Content-Type . "application/json"))))
- (let-values (((response port)
- (http-post (%zabbix-url)
- #:headers headers
- #:body (string->utf8
- (scm->json-string params))
- #:streaming? #t)))
+ (let ((response port (http-post (%zabbix-url)
+ #:headers headers
+ #:body (string->utf8
+ (scm->json-string params))
+ #:streaming? #t)))
(cond ((= 200 (response-code response))
(let ((result (json->scm port)))
(close-port port)
- master updated (966505d -> 0a9776e), Ludovic Courtès, 2023/10/25
- [no subject], Ludovic Courtès, 2023/10/25
- [no subject], Ludovic Courtès, 2023/10/25
- [no subject], Ludovic Courtès, 2023/10/25
- [no subject],
Ludovic Courtès <=
- [no subject], Ludovic Courtès, 2023/10/25
- [no subject], Ludovic Courtès, 2023/10/25
- [no subject], Ludovic Courtès, 2023/10/25
- [no subject], Ludovic Courtès, 2023/10/25
- [no subject], Ludovic Courtès, 2023/10/25