guix-commits
[Top][All Lists]
Advanced

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

04/05: Pass #:store to checkers that support it


From: Christopher Baines
Subject: 04/05: Pass #:store to checkers that support it
Date: Wed, 25 Mar 2020 04:14:51 -0400 (EDT)

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

commit 994318782a8184d3967d6b4b0e08391910879fc8
Author: Christopher Baines <address@hidden>
AuthorDate: Tue Mar 24 21:36:13 2020 +0000

    Pass #:store to checkers that support it
    
    The derivation checker currently opens a store connection on its own, but by
    passing the already open connection in, it won't have to do that, and
    hopefully this will make checking all the packages faster.
---
 guix-data-service/jobs/load-new-guix-revision.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/jobs/load-new-guix-revision.scm 
b/guix-data-service/jobs/load-new-guix-revision.scm
index 7781c76..91183e5 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -347,6 +347,10 @@ WHERE job_id = $1"
                              %local-checkers))
               (check (lint-checker-check checker)))
 
+         (define lint-checker-requires-store?-defined?
+           (defined? 'lint-checker-requires-store?
+             (resolve-module '(guix lint))))
+
          (define (process-lint-warning lint-warning)
            (list
             (match (lint-warning-location lint-warning)
@@ -397,7 +401,11 @@ WHERE job_id = $1"
              (cons
               package-id
               (map process-lint-warning
-                   (check package))))
+                   (if (and lint-checker-requires-store?-defined?
+                            (lint-checker-requires-store? checker))
+
+                       (check package #:store store)
+                       (check package)))))
            %package-table)))))
 
   (and



reply via email to

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