guix-commits
[Top][All Lists]
Advanced

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

02/03: Skip the derivation linter


From: Christopher Baines
Subject: 02/03: Skip the derivation linter
Date: Thu, 24 Nov 2022 07:38:11 -0500 (EST)

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

commit ff6f87a3b964b447dec88cf400e73c10b5063379
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu Nov 24 10:42:44 2022 +0000

    Skip the derivation linter
    
    And remove the chunking of derivation lint warnings.
    
    The derivation linter computes the derivation for each packages supported
    systems, but there are two problems with the approach. By doing this for 
each
    package in turn, it forces inefficient uses of caches, since most of the
    cached data is only relevant to a single system. More importantly though,
    because the work of checking one package is dependent on it's supported
    systems, it's unpredictable how much work will happen, and this will tend to
    increase as more packages support more systems.
    
    I think especially because of this last point, it's not worth attempting to
    keep running the derivation linter at the moment, because it doesn't seem
    sustainable. I can't see an way to run it that's futureproof and won't break
    at some point in the future when packages in Guix support more systems.
---
 guix-data-service/jobs/load-new-guix-revision.scm | 32 +++++++++--------------
 1 file changed, 12 insertions(+), 20 deletions(-)

diff --git a/guix-data-service/jobs/load-new-guix-revision.scm 
b/guix-data-service/jobs/load-new-guix-revision.scm
index 57f5eb1..03a47fc 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -643,27 +643,19 @@ WHERE job_id = $1")
         ((name description network-dependent?)
          (cons
           (list name description network-dependent?)
-          (if network-dependent?
+          (if (or network-dependent?
+                  (eq? name 'derivation))
               '()
-              (with-time-logging (simple-format #f "getting ~A lint warnings"
-                                                name)
-                (let loop ((packages-chunks
-                            (chunk packages 3000))
-                           (warnings '()))
-
-                  (if (null? packages-chunks)
-                      warnings
-                      (let ((new-warnings
-                             (inferior-eval-with-store
-                              inf
-                              store
-                              (lint-warnings-for-checker (car packages-chunks)
-                                                         name))))
-
-                        (cleanup-inferior inf)
-                        (loop (cdr packages-chunks)
-                              (append! warnings
-                                       new-warnings))))))))))
+              (let ((warnings
+                     (with-time-logging (simple-format #f "getting ~A lint 
warnings"
+                                                       name)
+                       (inferior-eval-with-store
+                        inf
+                        store
+                        (lint-warnings-for-checker packages
+                                                   name)))))
+                (cleanup-inferior inf)
+                warnings)))))
       checkers))))
 
 (define (all-inferior-package-derivations store inf packages)



reply via email to

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