From 7ecb13e4032360c766da6b57d9baebf729181a57 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 1 Feb 2024 13:16:08 +0100 Subject: 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& -- cgit v1.2.3