[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&
- 04/14: Remove even more time logging, (continued)
- 04/14: Remove even more time logging, Christopher Baines, 2024/02/02
- 02/14: Log the time to call inferior-packages-plus-replacements, Christopher Baines, 2024/02/02
- 05/14: Make sure to keep roots for channel instance derivations, Christopher Baines, 2024/02/02
- 07/14: Add more logging in when computing channel instance derivations, Christopher Baines, 2024/02/02
- 09/14: Split up handling of package description data, Christopher Baines, 2024/02/02
- 10/14: Fix exception handling in call-with-temporary-thread, Christopher Baines, 2024/02/02
- 12/14: Speed up loading package metadata, Christopher Baines, 2024/02/02
- 14/14: Cleanup some with-time-logging, Christopher Baines, 2024/02/02
- 06/14: Add some time logging in to inferior-packages-plus-replacements, Christopher Baines, 2024/02/02
- 11/14: Ignore inferior-protocol-error when computing channel instances, Christopher Baines, 2024/02/02
- 13/14: Compute lint warnings in parallel,
Christopher Baines <=
- 08/14: Speed up fetching package replacements, Christopher Baines, 2024/02/02
- 03/14: Improve logging when computing a channel instance derivation fails, Christopher Baines, 2024/02/02