guix-commits
[Top][All Lists]
Advanced

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

branch master updated: templates: Handle missing input case.


From: Mathieu Othacehe
Subject: branch master updated: templates: Handle missing input case.
Date: Sun, 26 Jul 2020 11:30:49 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix-cuirass.

The following commit(s) were added to refs/heads/master by this push:
     new f71f026  templates: Handle missing input case.
f71f026 is described below

commit f71f026a41d8e68e4a7f11ef6e708964594a599c
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sun Jul 26 17:28:03 2020 +0200

    templates: Handle missing input case.
    
    It happens that some left-over checkout entries refer to removed inputs. In
    that case, input will be #f, causing commit-hyperlink to fail with the
    following error message:
    
    In cuirass/http.scm:
       475:25  9 (url-handler _ _)
        193:3  8 (evaluation-html-page ((#:id . 5103) (# . 0) (# . 39) ?) ?)
    In cuirass/templates.scm:
       612:14  7 (evaluation-build-table _ #:checkouts _ #:inputs _ # _ # ?)
    In srfi/srfi-1.scm:
       586:17  6 (map1 (((#:commit . "3a3e9f2bb586e79a7931163f0191d?") ?)))
    In cuirass/templates.scm:
       621:39  5 (_ _)
       584:15  4 (commit-hyperlink #f "3a3e9f2bb586e79a7931163f0191df615?")
    In web/uri.scm:
       308:23  3 (string->uri _)
       278:14  2 (string->uri-reference _)
    In unknown file:
               1 (regexp-exec #<regexp 7f3a76c05980> #f #<undefined> #<u?>)
    In ice-9/boot-9.scm:
      1669:16  0 (raise-exception _ #:continuable? _)
    In procedure regexp-exec: Wrong type argument in position 2 (expecting 
string): #f
    
    * src/cuirass/templates.scm (evaluation-build-table): Do not call
    "commit-hyperlink" if the matching input could not be found.
---
 src/cuirass/templates.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 58ef142..170cc84 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -617,8 +617,12 @@ evaluation."
                                          inputs))
                             (url   (assq-ref input #:url))
                             (commit (assq-ref checkout #:commit)))
-                       `(tr (td ,url)
-                            (td (code ,(commit-hyperlink url commit))))))
+                       ;; Some checkout entries may refer to removed
+                       ;; inputs.
+                       (if input
+                           `(tr (td ,url)
+                                (td (code ,(commit-hyperlink url commit))))
+                           '())))
                    checkouts)))
 
     (p (@ (class "lead"))



reply via email to

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