guix-commits
[Top][All Lists]
Advanced

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

13/14: Compute lint warnings in parallel


From: Christopher Baines
Subject: 13/14: Compute lint warnings in parallel
Date: Fri, 2 Feb 2024 10:58:40 -0500 (EST)

cbaines pushed a commit to branch master
in repository data-service.

commit 7ecb13e4032360c766da6b57d9baebf729181a57
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu Feb 1 13:16:08 2024 +0100

    Compute lint warnings in parallel
---
 guix-data-service/jobs/load-new-guix-revision.scm | 49 +++++++++++++----------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/guix-data-service/jobs/load-new-guix-revision.scm 
b/guix-data-service/jobs/load-new-guix-revision.scm
index 7fc57f7..1b47ea6 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -349,6 +349,11 @@
 
   (ensure-gds-inferior-packages-defined! inf)
 
+  (inferior-eval '(and (resolve-module '(guix lint) #:ensure #f)
+                       (use-modules (guix lint))
+                       #t)
+                 inf)
+
   (with-time-logging (simple-format #f "getting ~A lint warnings"
                                     checker-name)
     (inferior-eval-with-store/non-blocking
@@ -1442,27 +1447,29 @@
   (simple-format #t "debug: extract-information-from: ~A\n" store-path)
 
   (letpar& ((inferior-lint-checkers-and-warnings-data
-             (with-resource-from-pool inf-and-store-pool res
-               (match res
-                 ((inferior . inferior-store)
-                  (let ((inferior-lint-checkers-data
-                         (inferior-lint-checkers inferior)))
-                    (cons
-                     inferior-lint-checkers-data
-                     (if inferior-lint-checkers-data
-                         (with-time-logging "fetching inferior lint warnings"
-                           (map
-                            (match-lambda
-                              ((checker-name _ network-dependent?)
-                               (and (and (not network-dependent?)
-                                         ;; Running the derivation linter is
-                                         ;; currently infeasible
-                                         (not (eq? checker-name 'derivation)))
-                                    (inferior-lint-warnings inferior
-                                                            inferior-store
-                                                            checker-name))))
-                            inferior-lint-checkers-data))
-                         #f)))))))
+             (let ((inferior-lint-checkers-data
+                    (with-resource-from-pool inf-and-store-pool res
+                      (match res
+                        ((inferior . inferior-store)
+                         (inferior-lint-checkers inferior))))))
+               (cons
+                inferior-lint-checkers-data
+                (and inferior-lint-checkers-data
+                     (with-time-logging "fetching inferior lint warnings"
+                       (par-map&
+                        (match-lambda
+                          ((checker-name _ network-dependent?)
+                           (and (and (not network-dependent?)
+                                     ;; Running the derivation linter is
+                                     ;; currently infeasible
+                                     (not (eq? checker-name 'derivation)))
+                                (with-resource-from-pool inf-and-store-pool res
+                                  (match res
+                                    ((inferior . inferior-store)
+                                     (inferior-lint-warnings inferior
+                                                             inferior-store
+                                                             
checker-name)))))))
+                        inferior-lint-checkers-data))))))
             (inferior-packages-system-and-target-to-derivations-alist
              (with-time-logging "getting inferior derivations"
                (par-map&



reply via email to

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