all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 70398@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Christopher Baines" <guix@cbaines.net>,
	"Josselin Poiret" <dev@jpoiret.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Ricardo Wurmus" <rekado@elephly.net>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#70398] [PATCH 1/5] records: Do not inline throws for ABI mismatches.
Date: Mon, 15 Apr 2024 17:37:03 +0200	[thread overview]
Message-ID: <a169679444f30d2d10c71438a00167c857ca50ef.1713194148.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1713194148.git.ludo@gnu.org>

* 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 @@ (define-syntax record-error
         (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 @@ (define-syntax record-error
       #`(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)
-- 
2.41.0





  reply	other threads:[~2024-04-15 15:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 15:27 [bug#70398] [PATCH 0/5] Reduce the size of gnu/packages/*.go files Ludovic Courtès
2024-04-15 15:37 ` Ludovic Courtès [this message]
2024-04-15 15:37 ` [bug#70398] [PATCH 2/5] packages: Reduce bloat induced by ‘sanitize-inputs’ Ludovic Courtès
2024-04-15 15:37 ` [bug#70398] [PATCH 3/5] records: Do not inline the constructor Ludovic Courtès
2024-04-15 15:37 ` [bug#70398] [PATCH 4/5] packages: ‘define-public’ replacement calls ‘module-export!’ directly Ludovic Courtès
2024-04-15 15:37 ` [bug#70398] [PATCH 5/5] packages: Reduce code bloat due to list allocation in input fields Ludovic Courtès
2024-04-15 17:56   ` Simon Tournier
2024-04-15 20:31     ` Ludovic Courtès
2024-04-22  0:15       ` Simon Tournier
2024-04-15 16:10 ` [bug#70398] [PATCH 0/5] Reduce the size of gnu/packages/*.go files Ludovic Courtès
2024-04-15 18:49   ` Simon Tournier
2024-04-15 16:24 ` Ludovic Courtès
2024-04-15 18:06 ` Simon Tournier
2024-05-04 17:17   ` bug#70398: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a169679444f30d2d10c71438a00167c857ca50ef.1713194148.git.ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=70398@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.