aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-02-01 13:16:08 +0100
committerChristopher Baines <mail@cbaines.net>2024-02-01 13:16:08 +0100
commit7ecb13e4032360c766da6b57d9baebf729181a57 (patch)
tree25605567e3bba340ed2099bb594206f00e0e0500 /guix-data-service
parent0468bc43211755d1767db2be04925d4910e82384 (diff)
downloaddata-service-7ecb13e4032360c766da6b57d9baebf729181a57.tar
data-service-7ecb13e4032360c766da6b57d9baebf729181a57.tar.gz
Compute lint warnings in parallel
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm49
1 files 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&