all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: "Jakub Kądziołka" <kuba@kadziolka.net>, 42146@debbugs.gnu.org
Subject: [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently.
Date: Mon, 23 Oct 2023 10:48:12 +0200	[thread overview]
Message-ID: <871qdliv1v.fsf_-_@gnu.org> (raw)
In-Reply-To: <d80dd0e1134cf608c69f3aaa0769f95a37f35e55.1697763444.git.maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Thu, 19 Oct 2023 20:57:39 -0400")

Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> From: Jakub Kądziołka <kuba@kadziolka.net>
>
> * guix/build/utils.scm (substitute, substitute*)
> [require-matches?]: New argument.
> * tests/build-utils.scm ("substitute*"): New test group.
> ("substitute*, no match error")
> ("substitute*, partial no match error"): New tests.
>
> Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> Change-Id: I66ed33d72aa73cd35e5642521efec70bf756f86e

[…]

> +(define-condition-type &substitute-error &error
> +  substitute-error?
> +  (file substitute-error-file)
> +  (patterns substitute-error-patterns))
> +
> +(define %substitute-requires-matches?
> +  (make-parameter #t))

[…]

> @@ -1048,9 +1086,19 @@ (define-syntax substitute*
>  Alternatively, FILE may be a list of file names, in which case they are
>  all subject to the substitutions.
>  
> +By default, SUBSTITUTE* will raise a &message condition if one of the patterns

I think it’s ‘&substitute-error’ rather than ‘&message’.

> +(define-substitute*-test test-error "substitute*, partial no match error"
> +  #t                                  ;expected
> +  "a\0b"                              ;content
> +  (("a") "c"
> +   ("Oops!") "c"))

Maybe it’s not all that important here, but I think ‘test-error’ tests
for any exception, whereas we’re looking specifically for a
‘&substitute-error’ condition filled with the right values.

Ludo’.




  reply	other threads:[~2023-10-23  8:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 22:09 [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Jakub Kądziołka
2020-06-30 22:11 ` [bug#42146] [PATCH 2/?] build: bootstrap-configure: Allow lack of matches in substitute Jakub Kądziołka
2020-06-30 22:11 ` [bug#42146] [PATCH 3/?] gnu: commencement: Build fix for %bootstrap-mes-rewired Jakub Kądziołka
     [not found] ` <handler.42146.B.159355497531278.ack@debbugs.gnu.org>
2020-06-30 22:50   ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Jakub Kądziołka
2023-10-19 13:14     ` Maxim Cournoyer
2020-07-01  0:42 ` [bug#42146] [PATCH 4/?] gnu: mes-boot: Use verbosity settings integrated into buildsystem Jakub Kądziołka
2020-07-01  0:42 ` [bug#42146] [PATCH 5/?] build-system/gnu: Allow lack of matches in substitution phases Jakub Kądziołka
2020-07-01  9:55 ` [bug#42146] [PATCH 6/6] gnu: glibc-mesboot0: Fixup the fixup-configure phase Jakub Kądziołka
2023-10-19 20:33 ` [bug#42146] [PATCH 1/3] build: Relocate <regexp*> record and associated procedures here Maxim Cournoyer
2023-10-19 20:33   ` [bug#42146] [PATCH 2/3] build: substitute: Error when no substitutions were done Maxim Cournoyer
2023-10-19 20:49     ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Ludovic Courtès
2023-10-20 18:50       ` Bruno Victal
2023-10-20 21:11         ` Maxim Cournoyer
2023-10-19 20:33   ` [bug#42146] [PATCH 3/3] build: bootstrap-configure: Allow lack of matches in substitute Maxim Cournoyer
2023-10-19 20:51     ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Ludovic Courtès
2023-10-19 20:40   ` Ludovic Courtès
2023-10-19 23:54     ` Maxim Cournoyer
2023-10-23  8:42       ` Ludovic Courtès
2023-10-23 15:05         ` Maxim Cournoyer
2023-10-20 15:11     ` Simon Tournier
2023-10-20 15:39       ` Maxim Cournoyer
2023-10-20  0:57 ` [bug#42146] [PATCH v3 1/3] build: Relocate <regexp*> record and associated procedures here Maxim Cournoyer
2023-10-20  0:57   ` [bug#42146] [PATCH v3 2/3] build: substitute: Error when no substitutions were done Maxim Cournoyer
2023-10-23  8:48     ` Ludovic Courtès [this message]
2023-10-23 16:25       ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Maxim Cournoyer
2023-10-23  8:51     ` Ludovic Courtès
2023-10-20  0:57   ` [bug#42146] [PATCH v3 3/3] build: bootstrap-configure: Allow lack of matches in substitute Maxim Cournoyer

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=871qdliv1v.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=42146@debbugs.gnu.org \
    --cc=kuba@kadziolka.net \
    --cc=maxim.cournoyer@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.