[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/22: records: Do not inline throws for ABI mismatches.
From: |
guix-commits |
Subject: |
01/22: records: Do not inline throws for ABI mismatches. |
Date: |
Sat, 4 May 2024 13:15:54 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 2f93e1682a02d76c59762ffaa99ee2abe4dea928
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Apr 8 21:47:29 2024 +0200
records: Do not inline throws for ABI mismatches.
* guix/records.scm (record-abi-mismatch-error): New procedure.
(abi-check): Use it.
Change-Id: I49936599716e117b8fbf26fb9d8f462bbbb8e88b
---
guix/records.scm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/guix/records.scm b/guix/records.scm
index f4d12a861d..48637ea0a4 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -61,6 +61,11 @@
(string-append "% " (symbol->string type-name)
" abi-cookie")))))
+ (define (record-abi-mismatch-error type)
+ (throw 'record-abi-mismatch-error 'abi-check
+ "~a: record ABI mismatch; recompilation needed"
+ (list type) '()))
+
(define (abi-check type cookie)
"Return syntax that checks that the current \"application binary
interface\" (ABI) for TYPE is equal to COOKIE."
@@ -68,9 +73,7 @@ interface\" (ABI) for TYPE is equal to COOKIE."
#`(unless (eq? current-abi #,cookie)
;; The source file where this exception is thrown must be
;; recompiled.
- (throw 'record-abi-mismatch-error 'abi-check
- "~a: record ABI mismatch; recompilation needed"
- (list #,type) '()))))
+ (record-abi-mismatch-error #,type))))
(define* (report-invalid-field-specifier name bindings
#:optional parent-form)
- branch master updated (9e184d5e54 -> ef8ab6ab66), guix-commits, 2024/05/04
- 15/22: gnu: Add perl-sub-override., guix-commits, 2024/05/04
- 01/22: records: Do not inline throws for ABI mismatches.,
guix-commits <=
- 04/22: packages: ‘define-public’ replacement calls ‘module-export!’ directly., guix-commits, 2024/05/04
- 08/22: services: cuirass: Remove use-substitutes? configuration option., guix-commits, 2024/05/04
- 14/22: gnu: Add perl-string-util., guix-commits, 2024/05/04
- 11/22: gnu: Add perl-html-selector-xpath., guix-commits, 2024/05/04
- 07/22: services: cuirass: Add new configuration options., guix-commits, 2024/05/04
- 09/22: gnu: gwenhywfar: Update to 5.10.2., guix-commits, 2024/05/04
- 21/22: gnu: gnucash: Update to 5.6., guix-commits, 2024/05/04
- 10/22: gnu: aqbanking: Update to 6.5.4., guix-commits, 2024/05/04
- 05/22: packages: Reduce code bloat due to list allocation in input fields., guix-commits, 2024/05/04
- 16/22: gnu: Add perl-html-tokeparser-simple., guix-commits, 2024/05/04