From 514ab0ccb6a4fa461b0a03f9ddd2b72b727106e6 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 27 Feb 2025 09:41:50 +0000 Subject: Add some crude exception handling to the package changes view --- guix-qa-frontpage/view/shared.scm | 63 +++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/guix-qa-frontpage/view/shared.scm b/guix-qa-frontpage/view/shared.scm index 804923b..4031265 100644 --- a/guix-qa-frontpage/view/shared.scm +++ b/guix-qa-frontpage/view/shared.scm @@ -338,35 +338,40 @@ %systems-to-submit-builds-for)))) (tbody (@ (style "overflow: auto; max-height: 40em;")) - ,@(vector-fold-right - (lambda (_ result package-and-version) - (let* ((builds - (builds-by-system - (assoc-ref package-and-version "base") - (assoc-ref package-and-version "target"))) - (change-by-system - (builds->change-by-system builds)) - (derivations - (derivations-by-system - (assoc-ref package-and-version "base") - (assoc-ref package-and-version "target")))) - (cons - `(tr - (@ ,@(if (display? package-and-version - change-by-system) - '() - '((style "display: none;")))) - (td ,(assoc-ref package-and-version "name")) - (td ,(assoc-ref package-and-version "version")) - ,@(map - (lambda (system) - (display-builds (assoc-ref builds system) - (assoc-ref derivations system) - (assoc-ref change-by-system system))) - %systems-to-submit-builds-for)) - result))) - '() - (assoc-ref derivation-changes "derivation_changes")))))))) + ,@(if (assq-ref derivation-changes 'exception) + `((tr + (td + (@ (colspan ,(+ 2 (length %systems-to-submit-builds-for)))) + (pre ,(simple-format #f "~A" derivation-changes))))) + (vector-fold-right + (lambda (_ result package-and-version) + (let* ((builds + (builds-by-system + (assoc-ref package-and-version "base") + (assoc-ref package-and-version "target"))) + (change-by-system + (builds->change-by-system builds)) + (derivations + (derivations-by-system + (assoc-ref package-and-version "base") + (assoc-ref package-and-version "target")))) + (cons + `(tr + (@ ,@(if (display? package-and-version + change-by-system) + '() + '((style "display: none;")))) + (td ,(assoc-ref package-and-version "name")) + (td ,(assoc-ref package-and-version "version")) + ,@(map + (lambda (system) + (display-builds (assoc-ref builds system) + (assoc-ref derivations system) + (assoc-ref change-by-system system))) + %systems-to-submit-builds-for)) + result))) + '() + (assoc-ref derivation-changes "derivation_changes"))))))))) (define (package-cross-changes-view title system -- cgit v1.2.3